aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala
index 4aa4100522..af2f31a34d 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala
@@ -385,7 +385,12 @@ trait StreamTest extends QueryTest with SharedSQLContext with Timeouts {
.streamingQuery
// Wait until the initialization finishes, because some tests need to use `logicalPlan`
// after starting the query.
- currentStream.awaitInitialization(streamingTimeout.toMillis)
+ try {
+ currentStream.awaitInitialization(streamingTimeout.toMillis)
+ } catch {
+ case _: StreamingQueryException =>
+ // Ignore the exception. `StopStream` or `ExpectFailure` will catch it as well.
+ }
case AdvanceManualClock(timeToAdd) =>
verify(currentStream != null,