Skip to content

Commit

Permalink
fix UT failure
Browse files Browse the repository at this point in the history
  • Loading branch information
yma11 committed Sep 18, 2023
1 parent 97c280d commit 2c18865
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ class GlutenHiveSQLQuerySuite extends GlutenSQLTestsTrait {

override protected def spark: SparkSession = _spark

override def afterAll(): Unit = {
try {
super.afterAll()
if (_spark != null) {
try {
_spark.sessionState.catalog.reset()
} finally {
_spark.stop()
_spark = null
}
}
} finally {
SparkSession.clearActiveSession()
SparkSession.clearDefaultSession()
doThreadPostAudit()
}
}

protected def defaultSparkConf: SparkConf = {
val conf = new SparkConf()
.set("spark.master", "local[1]")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ class GlutenHiveSQLQuerySuite extends GlutenSQLTestsTrait {

override protected def spark: SparkSession = _spark

override def afterAll(): Unit = {
try {
super.afterAll()
if (_spark != null) {
try {
_spark.sessionState.catalog.reset()
} finally {
_spark.stop()
_spark = null
}
}
} finally {
SparkSession.clearActiveSession()
SparkSession.clearDefaultSession()
doThreadPostAudit()
}
}

protected def defaultSparkConf: SparkConf = {
val conf = new SparkConf()
.set("spark.master", "local[1]")
Expand Down

0 comments on commit 2c18865

Please sign in to comment.