We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aff39c commit c97839aCopy full SHA for c97839a
core/src/test/scala/org/apache/spark/SparkContextSuite.scala
@@ -275,13 +275,16 @@ class SparkContextSuite extends SparkFunSuite with LocalSparkContext {
275
}
276
277
test("calling multiple sc.stop() must not throw any exception") {
278
- noException should be thrownBy {
+ try {
279
sc = new SparkContext(new SparkConf().setAppName("test").setMaster("local"))
280
val cnt = sc.parallelize(1 to 4).count()
281
sc.cancelAllJobs()
282
sc.stop()
283
// call stop second time
284
285
+ } catch {
286
+ case e: Exception =>
287
+ fail("calling multiple sc.stop() must not have thrown any exception", e);
288
289
290
0 commit comments