Skip to content

Commit

Permalink
[SPARK-20957][SS][TESTS] Fix o.a.s.sql.streaming.StreamingQueryManage…
Browse files Browse the repository at this point in the history
…rSuite listing

## What changes were proposed in this pull request?

When stopping StreamingQuery, StreamExecution will set `streamDeathCause` then notify StreamingQueryManager to remove this query. So it's possible that when `q2.exception.isDefined` returns `true`, StreamingQueryManager's active list still has `q2`.

This PR just puts the checks into `eventually` to fix the flaky test.

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <[email protected]>

Closes apache#18180 from zsxwing/SPARK-20957.
  • Loading branch information
zsxwing authored and tdas committed Jun 5, 2017
1 parent 06c0544 commit bc537e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class StreamingQueryManagerSuite extends StreamTest with BeforeAndAfter {
eventually(Timeout(streamingTimeout)) {
require(!q2.isActive)
require(q2.exception.isDefined)
assert(spark.streams.get(q2.id) === null)
assert(spark.streams.active.toSet === Set(q3))
}
assert(spark.streams.get(q2.id) === null)
assert(spark.streams.active.toSet === Set(q3))
}
}

Expand Down

0 comments on commit bc537e4

Please sign in to comment.