You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ya...@apache.org on 2025/05/08 10:53:33 UTC

(spark) branch master updated: [SPARK-52039][CORE][SQL][TESTS] Remove unnecessary `with PrivateMethodTester` from `ClosureCleanerSuite2` and `InsertSuite`

This is an automated email from the ASF dual-hosted git repository.

yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new f4f4b91d62af [SPARK-52039][CORE][SQL][TESTS] Remove unnecessary `with PrivateMethodTester` from `ClosureCleanerSuite2` and `InsertSuite`
f4f4b91d62af is described below

commit f4f4b91d62afe4f3fdf626bde31eb6405b4b64b6
Author: yangjie01 <ya...@baidu.com>
AuthorDate: Thu May 8 18:53:21 2025 +0800

    [SPARK-52039][CORE][SQL][TESTS] Remove unnecessary `with PrivateMethodTester` from `ClosureCleanerSuite2` and `InsertSuite`
    
    ### What changes were proposed in this pull request?
    This pr aims to remove unnecessary `with PrivateMethodTester` from `ClosureCleanerSuite2` and `InsertSuite`,
    
    ### Why are the changes needed?
    Code cleanup.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    ```
    build/sbt clean "core/testOnly org.apache.spark.util.ClosureCleanerSuite2"
    build/sbt clean "hive/testOnly org.apache.spark.sql.hive.InsertSuite"
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No
    
    Closes #50830 from LuciferYang/SPARK-52039.
    
    Authored-by: yangjie01 <ya...@baidu.com>
    Signed-off-by: yangjie01 <ya...@baidu.com>
---
 core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite2.scala | 4 ++--
 sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite2.scala b/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite2.scala
index b055dae39941..88b791783836 100644
--- a/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite2.scala
+++ b/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite2.scala
@@ -19,7 +19,7 @@ package org.apache.spark.util
 
 import java.io.NotSerializableException
 
-import org.scalatest.{BeforeAndAfterAll, PrivateMethodTester}
+import org.scalatest.BeforeAndAfterAll
 
 import org.apache.spark.{SparkContext, SparkException, SparkFunSuite}
 import org.apache.spark.serializer.SerializerInstance
@@ -28,7 +28,7 @@ import org.apache.spark.serializer.SerializerInstance
  * Another test suite for the closure cleaner that is finer-grained.
  * For tests involving end-to-end Spark jobs, see {{ClosureCleanerSuite}}.
  */
-class ClosureCleanerSuite2 extends SparkFunSuite with BeforeAndAfterAll with PrivateMethodTester {
+class ClosureCleanerSuite2 extends SparkFunSuite with BeforeAndAfterAll {
 
   // Start a SparkContext so that the closure serializer is accessible
   // We do not actually use this explicitly otherwise
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala
index cc7bb193731f..3a37ef8d922c 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala
@@ -22,7 +22,7 @@ import java.util.Locale
 
 import com.google.common.io.Files
 import org.apache.hadoop.fs.Path
-import org.scalatest.{BeforeAndAfter, PrivateMethodTester}
+import org.scalatest.BeforeAndAfter
 
 import org.apache.spark.SparkException
 import org.apache.spark.sql.{QueryTest, _}
@@ -39,7 +39,7 @@ case class TestData(key: Int, value: String)
 case class ThreeColumnTable(key: Int, value: String, key1: String)
 
 class InsertSuite extends QueryTest with TestHiveSingleton with BeforeAndAfter
-    with SQLTestUtils with PrivateMethodTester {
+    with SQLTestUtils {
   import spark.implicits._
 
   override lazy val testData = spark.sparkContext.parallelize(


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org