This is an automated email from the ASF dual-hosted git repository. zhangyue19921010 pushed a commit to branch fix_ut_0613 in repository https://gitbox.apache.org/repos/asf/hudi.git
commit 3e431b00f4a058ebcd777ca323225ca900c263f1 Author: YueZhang <[email protected]> AuthorDate: Fri Jun 13 16:23:16 2025 +0800 Fix Only one SparkContext should be running in this JVM --- .../test/scala/org/apache/spark/sql/hive/TestHiveClientUtils.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hudi-spark-datasource/hudi-spark-common/src/test/scala/org/apache/spark/sql/hive/TestHiveClientUtils.scala b/hudi-spark-datasource/hudi-spark-common/src/test/scala/org/apache/spark/sql/hive/TestHiveClientUtils.scala index be2bbd7dc9c..e9f6d9f45e4 100644 --- a/hudi-spark-datasource/hudi-spark-common/src/test/scala/org/apache/spark/sql/hive/TestHiveClientUtils.scala +++ b/hudi-spark-datasource/hudi-spark-common/src/test/scala/org/apache/spark/sql/hive/TestHiveClientUtils.scala @@ -24,7 +24,7 @@ import org.apache.spark.sql.hive.client.HiveClient import org.apache.spark.sql.hive.test.{TestHive, TestHiveContext} import org.apache.spark.sql.internal.StaticSQLConf.CATALOG_IMPLEMENTATION import org.junit.Assume -import org.junit.jupiter.api.{BeforeAll, Disabled, TestInstance} +import org.junit.jupiter.api.{AfterAll, BeforeAll, Disabled, TestInstance} import org.junit.jupiter.api.TestInstance.Lifecycle @TestInstance(Lifecycle.PER_CLASS) @@ -50,4 +50,9 @@ class TestHiveClientUtils { assert(spark.sparkContext.conf.get(CATALOG_IMPLEMENTATION) == "hive") assert(HiveClientUtils.getSingletonClientForMetadata(spark) == hiveClient) } + + @AfterAll + def afterEach(): Unit = { + spark.close() + } }
