forked from apache/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KUDU-2687: fix ITClient retries (take two)
After adding randomly injected failures, I finally figured out why ITClient retries were broken: because, surprisingly, the RetryRule does _not_ reinitialize non-static test class fields. As such, the latches' counts were never reset, and so every test retry would immediately fail. Along the way I improved the test in a few ways: - Switched from two latches to just one. - Ensured that the test cleaned up its threads on failure. - Made the test throw the failing exception directly rather than logging it and forcing you to scroll around looking for the logged message. - Switched from Random to RandomUtils. - Relatedly, fixed the reuse of CapturingLogAppender in TestSecurity, which caused every test to capture the events of all tests that ran before it. Change-Id: I31ec2d708d0ed41f25abcf09011967062c9a56c6 Reviewed-on: http://gerrit.cloudera.org:8080/12820 Reviewed-by: Grant Henke <[email protected]> Tested-by: Kudu Jenkins
- Loading branch information
Showing
2 changed files
with
41 additions
and
26 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