Skip to content

Commit 2740c63

Browse files
committed
Fix tests
1 parent 0bdc81c commit 2740c63

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

sql/core/src/test/scala/org/apache/spark/sql/SessionStateSuite.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ class SessionStateSuite extends SparkFunSuite
4444
createSession()
4545
}
4646

47+
override def afterAll(): Unit = {
48+
if (sparkContext != null) {
49+
sparkContext.stop()
50+
}
51+
}
52+
4753
test("fork new session and inherit RuntimeConfig options") {
4854
val key = "spark-config-clone"
4955
activeSession.conf.set(key, "active")

sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveSessionStateSuite.scala

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,12 @@ import org.apache.spark.sql.hive.test.TestHiveSingleton
2828
class HiveSessionStateSuite extends SessionStateSuite
2929
with TestHiveSingleton with BeforeAndAfterEach {
3030

31-
override def beforeEach(): Unit = {
32-
createSession()
33-
}
34-
3531
override def afterEach(): Unit = {}
3632

3733
override def beforeAll(): Unit = {}
3834

3935
override def afterAll(): Unit = {
40-
try {
41-
hiveContext.reset()
42-
} finally {
43-
super.afterAll()
44-
}
36+
hiveContext.reset()
4537
}
4638

4739
override def createSession(): Unit = {

0 commit comments

Comments
 (0)