Skip to content

[Tests] Add longer delay time to mitigate flaky test in TestAsyncFlatMap#1561

Merged
cameronlee314 merged 1 commit intoapache:masterfrom
cameronlee314:flakytestasyncflatmap
Nov 18, 2021
Merged

[Tests] Add longer delay time to mitigate flaky test in TestAsyncFlatMap#1561
cameronlee314 merged 1 commit intoapache:masterfrom
cameronlee314:flakytestasyncflatmap

Conversation

@cameronlee314
Copy link
Contributor

@cameronlee314 cameronlee314 commented Nov 17, 2021

Issues: TestAsyncFlatMap.testProcessingFutureCompletesAfterTaskTimeout fails transiently. It looks like the task timeout gets triggered (which would set the error to the expected error for the test), but occasionally, before the RunLoop exits, the actual processing task completes, and then the final error is overridden to be Callback complete was invoked after completion... (which is not the expected error). The difference between the timeout and the actual processing time is 100ms, so if the RunLoop doesn't exit within 100ms, then this test will fail.
Changes: Increase the delay time in the test so that the RunLoop has more time to exit before the actual processing task completes.
Tests: TestAsyncFlatMap.testProcessingFutureCompletesAfterTaskTimeout passes
API changes: N/A

@cameronlee314 cameronlee314 merged commit dc687db into apache:master Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants