-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-6005][Tests]Fix flaky test: o.a.s.streaming.kafka.DirectKafkaStreamSuite.offset recovery #12903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @tdas |
|
Test build #57784 has finished for PR 12903 at commit
|
|
LGTM. Test for flakiness by running multiple times. |
|
Test build #2979 has finished for PR 12903 at commit
|
|
Test build #2980 has finished for PR 12903 at commit
|
|
Test build #2981 has finished for PR 12903 at commit
|
|
Test build #2982 has finished for PR 12903 at commit
|
|
All tests passed. Merging to master and 2.0 |
…StreamSuite.offset recovery ## What changes were proposed in this pull request? Because this test extracts data from `DStream.generatedRDDs` before stopping, it may get data before checkpointing. Then after recovering from the checkpoint, `recoveredOffsetRanges` may contain something not in `offsetRangesBeforeStop`, which will fail the test. Adding `Thread.sleep(1000)` before `ssc.stop()` will reproduce this failure. This PR just moves the logic of `offsetRangesBeforeStop` (also renamed to `offsetRangesAfterStop`) after `ssc.stop()` to fix the flaky test. ## How was this patch tested? Jenkins unit tests. Author: Shixiong Zhu <[email protected]> Closes #12903 from zsxwing/SPARK-6005. (cherry picked from commit 9533f53) Signed-off-by: Shixiong Zhu <[email protected]>
…StreamSuite.offset recovery ## What changes were proposed in this pull request? Because this test extracts data from `DStream.generatedRDDs` before stopping, it may get data before checkpointing. Then after recovering from the checkpoint, `recoveredOffsetRanges` may contain something not in `offsetRangesBeforeStop`, which will fail the test. Adding `Thread.sleep(1000)` before `ssc.stop()` will reproduce this failure. This PR just moves the logic of `offsetRangesBeforeStop` (also renamed to `offsetRangesAfterStop`) after `ssc.stop()` to fix the flaky test. ## How was this patch tested? Jenkins unit tests. Author: Shixiong Zhu <[email protected]> Closes #12903 from zsxwing/SPARK-6005. (cherry picked from commit 9533f53) Signed-off-by: Sean Owen <[email protected]>
|
Also merged to 1.6 |
…StreamSuite.offset recovery ## What changes were proposed in this pull request? Because this test extracts data from `DStream.generatedRDDs` before stopping, it may get data before checkpointing. Then after recovering from the checkpoint, `recoveredOffsetRanges` may contain something not in `offsetRangesBeforeStop`, which will fail the test. Adding `Thread.sleep(1000)` before `ssc.stop()` will reproduce this failure. This PR just moves the logic of `offsetRangesBeforeStop` (also renamed to `offsetRangesAfterStop`) after `ssc.stop()` to fix the flaky test. ## How was this patch tested? Jenkins unit tests. Author: Shixiong Zhu <[email protected]> Closes apache#12903 from zsxwing/SPARK-6005. (cherry picked from commit 9533f53) Signed-off-by: Sean Owen <[email protected]> (cherry picked from commit 4fdac3c)
What changes were proposed in this pull request?
Because this test extracts data from
DStream.generatedRDDsbefore stopping, it may get data before checkpointing. Then after recovering from the checkpoint,recoveredOffsetRangesmay contain something not inoffsetRangesBeforeStop, which will fail the test. AddingThread.sleep(1000)beforessc.stop()will reproduce this failure.This PR just moves the logic of
offsetRangesBeforeStop(also renamed tooffsetRangesAfterStop) afterssc.stop()to fix the flaky test.How was this patch tested?
Jenkins unit tests.