forked from apache/bookkeeper
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue 4109: Fix Flaky-test: HandleFailuresTest.testHandleFailureBooki…
…eNotInWriteSet (apache#4110) Master Issue: apache#4109 ### Motivation Fix Flaky-test: HandleFailuresTest.testHandleFailureBookieNotInWriteSet When we call `b1Delay.completeExceptionally(new BKException.BKWriteException())` at line480(code1), the `preWriteHook` will complete with exception and then do some actions in the choosen thread(code2), e.g., put the failure bookie to `delayedWriteFailedBookies`(code3). So the `delayedWriteFailedBookies` update is async. However, `lh.appendAsync("entry2".getBytes()))`(Line483 in Code4) is invoked in main thread. So when `appendAsync` execute, the `delayedWriteFailedBookies` could be not updated yet, and `changeInProgress.complete(null)`(code5) will never be invoked.
- Loading branch information
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters