Skip to content

Commit 8ca3031

Browse files
committed
Fix SQLListenerMemoryLeakSuite test error
1 parent cc243a0 commit 8ca3031

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ class SQLListenerMemoryLeakSuite extends SparkFunSuite {
343343
.set("spark.sql.ui.retainedExecutions", "50") // Set it to 50 to run this test quickly
344344
val sc = new SparkContext(conf)
345345
try {
346+
// Clear the sql listener created by a previous test suite.
347+
SQLContext.clearSqlListener()
346348
val sqlContext = new SQLContext(sc)
347349
import sqlContext.implicits._
348350
// Run 100 successful executions and 100 failed executions.

0 commit comments

Comments
 (0)