This is an automated email from the ASF dual-hosted git repository.
zhangyue19921010 pushed a commit to branch branch-0.x
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/branch-0.x by this push:
new 466ca418aac [HUDI-9086] Fix spark context not shutting down in CI
(#13175)
466ca418aac is described below
commit 466ca418aacc523ab11614fd3b233ee2b5db7316
Author: Y Ethan Guo <[email protected]>
AuthorDate: Mon Apr 21 03:03:11 2025 -0700
[HUDI-9086] Fix spark context not shutting down in CI (#13175)
* [HUDI-9086] Fix spark context not shutting down in CI
* Add more fix
---
.../test/scala/org/apache/spark/sql/hive/TestHiveClientUtils.scala | 5 +++--
.../src/test/scala/org/apache/hudi/TestHoodieDataSourceHelper.scala | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
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 814975ffff8..be2bbd7dc9c 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
@@ -18,13 +18,14 @@
package org.apache.spark.sql.hive
import org.apache.hudi.common.testutils.HoodieTestUtils.getJavaVersion
+
import org.apache.spark.sql.SparkSession
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.TestInstance.Lifecycle
-import org.junit.jupiter.api.{BeforeAll, Test, TestInstance}
@TestInstance(Lifecycle.PER_CLASS)
class TestHiveClientUtils {
@@ -44,7 +45,7 @@ class TestHiveClientUtils {
hiveClient =
spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
}
- @Test
+ @Disabled("HUDI-9118")
def reuseHiveClientFromSparkSession(): Unit = {
assert(spark.sparkContext.conf.get(CATALOG_IMPLEMENTATION) == "hive")
assert(HiveClientUtils.getSingletonClientForMetadata(spark) == hiveClient)
diff --git
a/hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestHoodieDataSourceHelper.scala
b/hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestHoodieDataSourceHelper.scala
index 7f660136a30..16c1a81da3d 100644
---
a/hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestHoodieDataSourceHelper.scala
+++
b/hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestHoodieDataSourceHelper.scala
@@ -18,12 +18,14 @@
package org.apache.hudi
+import org.apache.hudi.testutils.HoodieClientTestBase
+
import org.apache.spark.sql.functions.expr
import org.apache.spark.sql.sources.Filter
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
-class TestHoodieDataSourceHelper extends SparkAdapterSupport {
+class TestHoodieDataSourceHelper extends HoodieClientTestBase with
SparkAdapterSupport {
def checkCondition(filter: Option[Filter], outputSet: Set[String], expected:
Any): Unit = {
val actual =
HoodieDataSourceHelper.extractPredicatesWithinOutputSet(filter.get, outputSet)