Skip to content

Commit 9d44ddc

Browse files
kayousterhoutJoshRosen
authored andcommitted
[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. JoshRosen would be great if you could take a look at this, since you wrote this test originally. Author: Kay Ousterhout <[email protected]> Closes #5401 from kayousterhout/SPARK-6753 and squashes the following commits: 368c540 [Kay Ousterhout] [SPARK-6753] Clone SparkConf in ShuffleSuite tests
1 parent f7e21dd commit 9d44ddc

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)