File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
core/src/test/scala/org/apache/spark Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -278,9 +278,13 @@ class SparkContextSuite extends FunSuite with LocalSparkContext {
278278 test(" Spark Context Logs URL presence" ) {
279279 System .setProperty(" spark.driver.log.stdout" , " dummy stdout" )
280280 System .setProperty(" spark.driver.log.stderr" , " dummy stderr" )
281- val sc = new SparkContext (new SparkConf ().setAppName(" test" ).setMaster(" local" ))
282- assert(sc.logUrls.nonEmpty)
283- val urls = sc.logUrls.get
284- assert(urls === Predef .Map (" stdout" -> " dummy stdout" ," stderr" -> " dummy stderr" ))
281+ sc = new SparkContext (new SparkConf ().setAppName(" test" ).setMaster(" local" ))
282+ try {
283+ assert(sc.logUrls.nonEmpty)
284+ val urls = sc.logUrls.get
285+ assert(urls === Predef .Map (" stdout" -> " dummy stdout" , " stderr" -> " dummy stderr" ))
286+ } finally {
287+ sc.stop()
288+ }
285289 }
286290}
You can’t perform that action at this time.
0 commit comments