From 8384fe6646676a17c293a94140c326ddbf4c29ee Mon Sep 17 00:00:00 2001 From: v_kkhuang <420895376@qq.com> Date: Sat, 7 Oct 2023 19:01:57 +0800 Subject: [PATCH] add configration test --- .../linkis-common/src/test/resources/linkis.properties | 3 ++- .../org/apache/linkis/common/conf/ConfigurationTest.scala | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/linkis-commons/linkis-common/src/test/resources/linkis.properties b/linkis-commons/linkis-common/src/test/resources/linkis.properties index 230ad85a4e..d656beedd2 100644 --- a/linkis-commons/linkis-common/src/test/resources/linkis.properties +++ b/linkis-commons/linkis-common/src/test/resources/linkis.properties @@ -13,4 +13,5 @@ # limitations under the License. # -linkis.jobhistory.error.msg.tip=properties支持中文 \ No newline at end of file +linkis.jobhistory.error.msg.tip=properties支持中文 +linkis.test.error.conf=123 \ No newline at end of file diff --git a/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/conf/ConfigurationTest.scala b/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/conf/ConfigurationTest.scala index ee1102c91c..00ba6be7fc 100644 --- a/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/conf/ConfigurationTest.scala +++ b/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/conf/ConfigurationTest.scala @@ -27,4 +27,11 @@ class ConfigurationTest { Assertions.assertFalse(Configuration.isAdmin("HaDooop")) } + + @Test private[conf] def testFormatValue(): Unit = { + val confvalue = CommonVars[Int]("linkis.test.error.conf", 456).getValue + Assertions.assertTrue(123 == confvalue) + } + + }