File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
core/src/test/scala/org/apache/spark Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,19 @@ class ExecutorAllocationManagerSuite extends FunSuite with LocalSparkContext wit
4949 .set(" spark.dynamicAllocation.enabled" , " true" )
5050 .set(" spark.dynamicAllocation.testing" , " true" )
5151 val sc0 = new SparkContext (conf)
52+ contexts += sc0
5253 assert(sc0.executorAllocationManager.isDefined)
5354 sc0.stop()
5455
5556 // Min < 0
5657 val conf1 = conf.clone().set(" spark.dynamicAllocation.minExecutors" , " -1" )
57- intercept[SparkException ] { new SparkContext (conf1) }
58+ intercept[SparkException ] { contexts += new SparkContext (conf1) }
5859 SparkEnv .get.stop()
5960 SparkContext .clearActiveContext()
6061
6162 // Max < 0
6263 val conf2 = conf.clone().set(" spark.dynamicAllocation.maxExecutors" , " -1" )
63- intercept[SparkException ] { new SparkContext (conf2) }
64+ intercept[SparkException ] { contexts += new SparkContext (conf2) }
6465 SparkEnv .get.stop()
6566 SparkContext .clearActiveContext()
6667
You can’t perform that action at this time.
0 commit comments