diff options
Diffstat (limited to 'bagel/src/test')
-rw-r--r-- | bagel/src/test/scala/bagel/BagelSuite.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bagel/src/test/scala/bagel/BagelSuite.scala b/bagel/src/test/scala/bagel/BagelSuite.scala index d2189169d2..3da7152a09 100644 --- a/bagel/src/test/scala/bagel/BagelSuite.scala +++ b/bagel/src/test/scala/bagel/BagelSuite.scala @@ -18,7 +18,10 @@ class BagelSuite extends FunSuite with Assertions with BeforeAndAfter { var sc: SparkContext = _ after { - sc.stop() + if (sc != null) { + sc.stop() + sc = null + } } test("halting by voting") { |