Skip to content

Commit 368c540

Browse files
committed
[SPARK-6753] Clone SparkConf in ShuffleSuite tests
Prior to this change, the unit test for SPARK-3426 did not clone the original SparkConf, which meant that that test did not use the options set by suites that subclass ShuffleSuite.scala. This commit fixes that problem.
1 parent 1232215 commit 368c540

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/test/scala/org/apache/spark/ShuffleSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ abstract class ShuffleSuite extends FunSuite with Matchers with LocalSparkContex
242242
shuffleSpillCompress <- Set(true, false);
243243
shuffleCompress <- Set(true, false)
244244
) {
245-
val conf = new SparkConf()
245+
val myConf = conf.clone()
246246
.setAppName("test")
247247
.setMaster("local")
248248
.set("spark.shuffle.spill.compress", shuffleSpillCompress.toString)
249249
.set("spark.shuffle.compress", shuffleCompress.toString)
250250
.set("spark.shuffle.memoryFraction", "0.001")
251251
resetSparkContext()
252-
sc = new SparkContext(conf)
252+
sc = new SparkContext(myConf)
253253
try {
254254
sc.parallelize(0 until 100000).map(i => (i / 4, i)).groupByKey().collect()
255255
} catch {

0 commit comments

Comments
 (0)