From 787ba9efe25c5d12b97eeed7e57390326cce8bbe Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Thu, 23 Sep 2021 09:31:29 +0800 Subject: [PATCH] [KYUUBI #1134] [TEST] DataLake suites should clean up withKyuubiConf instead of extraConfigs ### _Why are the changes needed?_ Keep consistent with ``` withKyuubiConf.foreach { case (k, v) => System.setProperty(k, v) kyuubiConf.set(k, v) } ``` ### _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 - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1134 from pan3793/t. Closes #1134 b8e0aa65 [Cheng Pan] [TEST] DataLake Suites should clean up withKyuubiConf instead of extraConfigs Authored-by: Cheng Pan Signed-off-by: Cheng Pan --- .../engine/spark/operation/SparkDeltaOperationSuite.scala | 4 +++- .../engine/spark/operation/SparkHudiOperationSuite.scala | 3 ++- .../engine/spark/operation/SparkIcebergOperationSuite.scala | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkDeltaOperationSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkDeltaOperationSuite.scala index be55d6747..d85b391ca 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkDeltaOperationSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkDeltaOperationSuite.scala @@ -23,12 +23,14 @@ import org.apache.kyuubi.tags.DeltaTest @DeltaTest class SparkDeltaOperationSuite extends WithSparkSQLEngine with BasicDeltaJDBCTests { + override protected def jdbcUrl: String = getJdbcUrl + override def withKyuubiConf: Map[String, String] = extraConfigs override def afterAll(): Unit = { super.afterAll() - for ((k, _) <- extraConfigs) { + for ((k, _) <- withKyuubiConf) { System.clearProperty(k) } } diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkHudiOperationSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkHudiOperationSuite.scala index f2f601794..e40143326 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkHudiOperationSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkHudiOperationSuite.scala @@ -23,13 +23,14 @@ import org.apache.kyuubi.tags.HudiTest @HudiTest class SparkHudiOperationSuite extends WithSparkSQLEngine with BasicHudiJDBCTests { + override protected def jdbcUrl: String = getJdbcUrl override def withKyuubiConf: Map[String, String] = extraConfigs override def afterAll(): Unit = { super.afterAll() - for ((k, _) <- extraConfigs) { + for ((k, _) <- withKyuubiConf) { System.clearProperty(k) } } diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkIcebergOperationSuite.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkIcebergOperationSuite.scala index 153e65129..cea2438e5 100644 --- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkIcebergOperationSuite.scala +++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/SparkIcebergOperationSuite.scala @@ -23,12 +23,14 @@ import org.apache.kyuubi.tags.IcebergTest @IcebergTest class SparkIcebergOperationSuite extends WithSparkSQLEngine with BasicIcebergJDBCTests { + override protected def jdbcUrl: String = getJdbcUrl + override def withKyuubiConf: Map[String, String] = extraConfigs override def afterAll(): Unit = { super.afterAll() - for ((k, _) <- extraConfigs) { + for ((k, _) <- withKyuubiConf) { System.clearProperty(k) } }