Skip to content

Commit 62b09a3

Browse files
committed
clear active SQLContext before and after tests
1 parent e130df6 commit 62b09a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mllib/src/test/scala/org/apache/spark/mllib/util/MLlibTestSparkContext.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ trait MLlibTestSparkContext extends BeforeAndAfterAll { self: Suite =>
3232
.setMaster("local[2]")
3333
.setAppName("MLlibUnitTest")
3434
sc = new SparkContext(conf)
35+
SQLContext.clearActive()
3536
sqlContext = new SQLContext(sc)
3637
}
3738

3839
override def afterAll() {
3940
sqlContext = null
41+
SQLContext.clearActive()
4042
if (sc != null) {
4143
sc.stop()
4244
}

0 commit comments

Comments
 (0)