Skip to content

Commit 78c8bd2

Browse files
squitocloud-fan
authored andcommitted
[SPARK-25805][SQL][TEST] Fix test for SPARK-25159
The original test would sometimes fail if the listener bus did not keep up, so just wait till the listener bus is empty. Tested by adding a sleep in the listener, which made the test consistently fail without the fix, but pass consistently after the fix. Closes #22799 from squito/SPARK-25805. Authored-by: Imran Rashid <irashid@cloudera.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
1 parent 03e82e3 commit 78c8bd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,6 +2537,7 @@ class DataFrameSuite extends QueryTest with SharedSQLContext {
25372537

25382538
val df = spark.read.json(path.getCanonicalPath)
25392539
assert(df.columns === Array("i", "p"))
2540+
spark.sparkContext.listenerBus.waitUntilEmpty(10000)
25402541
assert(numJobs == 1)
25412542
}
25422543
}

0 commit comments

Comments
 (0)