From ccb8117cff16ba26e3e219274e9c3b230482f637 Mon Sep 17 00:00:00 2001 From: wForget <643348094@qq.com> Date: Mon, 25 Oct 2021 14:49:20 +0800 Subject: [PATCH] [KYUUBI #1267] Modify comments for the golden file test suite and fix it ### _Why are the changes needed?_ Modify comments for the golden file test suite and fix it, see #1267 for details. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [X] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1272 from wForget/KYUUBI-1267. Closes #1267 f8c4c586 [wForget] [KYUUBI #1267] Make appName and appId to lazy 417c9db7 [wForget] Merge branch 'master' of https://github.com/apache/incubator-kyuubi into KYUUBI-1267 512458be [wForget] [KYUUBI #1267] Modify comments for the golden file test suite and fix it Authored-by: wForget <643348094@qq.com> Signed-off-by: ulysses-you --- .../org/apache/kyuubi/engine/spark/udf/KDFRegistry.scala | 4 ++-- .../kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala | 4 ++-- .../org/apache/kyuubi/config/AllKyuubiConfiguration.scala | 4 ++-- .../kyuubi/operation/tpcds/OutputSchemaTPCDSSuite.scala | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/udf/KDFRegistry.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/udf/KDFRegistry.scala index af58c4cfb..310d20056 100644 --- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/udf/KDFRegistry.scala +++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/udf/KDFRegistry.scala @@ -31,8 +31,8 @@ object KDFRegistry { @transient val registeredFunctions = new ArrayBuffer[KyuubiDefinedFunction]() - val appName = SparkEnv.get.conf.get("spark.app.name") - val appId = SparkEnv.get.conf.get("spark.app.id") + lazy val appName = SparkEnv.get.conf.get("spark.app.name") + lazy val appId = SparkEnv.get.conf.get("spark.app.id") val kyuubi_version: KyuubiDefinedFunction = create( "kyuubi_version", diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala index 21e8e13e3..41a564839 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala @@ -30,12 +30,12 @@ import org.apache.kyuubi.{KyuubiFunSuite, TestUtils} * * To run the entire test suite: * {{{ - * build/mvn test -DwildcardSuites=org.apache.kyuubi.engine.spark.udf.KyuubiDefinedFunctionSuite -pl '!externals/kyuubi-download' + * build/mvn clean install -Pspark-provided -DwildcardSuites=org.apache.kyuubi.engine.spark.udf.KyuubiDefinedFunctionSuite * }}} * * To re-generate golden files for entire suite, run: * {{{ - * KYUUBI_UPDATE=1 build/mvn test -DwildcardSuites=org.apache.kyuubi.engine.spark.udf.KyuubiDefinedFunctionSuite -pl '!externals/kyuubi-download' + * KYUUBI_UPDATE=1 build/mvn clean install -Pspark-provided -DwildcardSuites=org.apache.kyuubi.engine.spark.udf.KyuubiDefinedFunctionSuite * }}} */ // scalastyle:on line.size.limit diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala index 89b2f3cee..72fff07e7 100644 --- a/kyuubi-server/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala +++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala @@ -35,12 +35,12 @@ import org.apache.kyuubi.zookeeper.ZookeeperConf * * To run the entire test suite: * {{{ - * build/mvn test -DwildcardSuites=org.apache.kyuubi.config.AllKyuubiConfiguration -pl '!externals/kyuubi-download' + * build/mvn clean install -Pspark-provided -DwildcardSuites=org.apache.kyuubi.config.AllKyuubiConfiguration * }}} * * To re-generate golden files for entire suite, run: * {{{ - * KYUUBI_UPDATE=1 build/mvn test -DwildcardSuites=org.apache.kyuubi.config.AllKyuubiConfiguration -pl '!externals/kyuubi-download' + * KYUUBI_UPDATE=1 build/mvn clean install -Pspark-provided -DwildcardSuites=org.apache.kyuubi.config.AllKyuubiConfiguration * }}} */ // scalastyle:on line.size.limit diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/tpcds/OutputSchemaTPCDSSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/tpcds/OutputSchemaTPCDSSuite.scala index edbac8da2..b00adb0bc 100644 --- a/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/tpcds/OutputSchemaTPCDSSuite.scala +++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/tpcds/OutputSchemaTPCDSSuite.scala @@ -29,12 +29,12 @@ import org.apache.kyuubi.tags.{DeltaTest, ExtendedSQLTest} /** * To run this test suite: * {{{ - * build/mvn test -Pspark-3.1 -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds.OutputSchemaTPCDSSuite -Dmaven.plugin.scalatest.exclude.tags='' + * build/mvn clean install -Pspark-3.1 -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds.OutputSchemaTPCDSSuite * }}} * * To re-generate golden files for this suite: * {{{ - * KYUUBI_UPDATE=1 build/mvn test -Pspark-3.1 -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds.OutputSchemaTPCDSSuite -Dmaven.plugin.scalatest.exclude.tags='' + * KYUUBI_UPDATE=1 build/mvn clean install -Pspark-3.1 -Dtest=none -DwildcardSuites=org.apache.kyuubi.operation.tpcds.OutputSchemaTPCDSSuite * }}} */ // scalastyle:on line.size.limit