Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-24663][STREAMING][TESTS] StreamingContextSuite: Wait until slo…
…w receiver has been initialized, but with hard timeout ### What changes were proposed in this pull request? This patch fixes the flaky test failure from StreamingContextSuite "stop slow receiver gracefully", via putting flag whether initializing slow receiver is completed, and wait for such flag to be true. As receiver should be submitted via job and initialized in executor, 500ms might not be enough for covering all cases. ### Why are the changes needed? We got some reports for test failure on this test. Please refer [SPARK-24663](https://issues.apache.org/jira/browse/SPARK-24663) ### Does this PR introduce any user-facing change? No ### How was this patch tested? Modified UT. I've artificially made delay on handling job submission via adding below code in `DAGScheduler.submitJob`: ``` if (rdd != null && rdd.name != null && rdd.name.startsWith("Receiver")) { println(s"Receiver Job! rdd name: ${rdd.name}") Thread.sleep(1000) } ``` and the test "stop slow receiver gracefully" failed on current master and passed on the patch. Closes #25725 from HeartSaVioR/SPARK-24663. Authored-by: Jungtaek Lim (HeartSaVioR) <[email protected]> Signed-off-by: Marcelo Vanzin <[email protected]>
- Loading branch information