From 0c64be6ab096c215f51971acc70a181e096c373c Mon Sep 17 00:00:00 2001 From: Erik Krogen Date: Fri, 19 Feb 2021 08:33:56 -0800 Subject: [PATCH 1/3] [SPARK-33084][SQL][TEST][FOLLOW-ON] Add ResetSystemProperties trait to SQLQuerySuite and use newer Ivy property for local directory override. --- .../test/scala/org/apache/spark/sql/SQLQuerySuite.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala index 98af68b3f4cb7..0b60dd89ef3af 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala @@ -47,8 +47,10 @@ import org.apache.spark.sql.test.{SharedSparkSession, TestSQLContext} import org.apache.spark.sql.test.SQLTestData._ import org.apache.spark.sql.types._ import org.apache.spark.unsafe.types.CalendarInterval +import org.apache.spark.util.ResetSystemProperties -class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSparkPlanHelper { +class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSparkPlanHelper + with ResetSystemProperties { import testImplicits._ setupTestData() @@ -3835,7 +3837,7 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark val sumFuncClass = "org.apache.spark.examples.sql.Spark33084" val functionName = "test_udf" withTempDir { dir => - System.setProperty("ivy.home", dir.getAbsolutePath) + System.setProperty("ivy.default.ivy.user.dir", dir.getAbsolutePath) val sourceJar = new File(Thread.currentThread().getContextClassLoader .getResource("SPARK-33084.jar").getFile) val targetCacheJarDir = new File(dir.getAbsolutePath + @@ -3860,7 +3862,6 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark checkAnswer(sql("SELECT * FROM v1"), Seq(Row(2.0))) } } - System.clearProperty("ivy.home") } } From 89c88e899a5ca6a87d6d06484a0ae508f701b51e Mon Sep 17 00:00:00 2001 From: Erik Krogen Date: Mon, 1 Mar 2021 16:35:34 -0800 Subject: [PATCH 2/3] empty commit to trigger tests From 840b630b595355f5e5eba7d7d420d391eb5ef60d Mon Sep 17 00:00:00 2001 From: Erik Krogen Date: Tue, 2 Mar 2021 11:11:00 -0800 Subject: [PATCH 3/3] Revert property name change, use ivy.home again. --- .../src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala index 0b60dd89ef3af..1273a91e5510b 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala @@ -3837,7 +3837,7 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark val sumFuncClass = "org.apache.spark.examples.sql.Spark33084" val functionName = "test_udf" withTempDir { dir => - System.setProperty("ivy.default.ivy.user.dir", dir.getAbsolutePath) + System.setProperty("ivy.home", dir.getAbsolutePath) val sourceJar = new File(Thread.currentThread().getContextClassLoader .getResource("SPARK-33084.jar").getFile) val targetCacheJarDir = new File(dir.getAbsolutePath +