-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Retry flaky unified tests #1565
base: main
Are you sure you want to change the base?
Conversation
6282ce7
to
8e8d7a3
Compare
8e8d7a3
to
6f3b56d
Compare
d24e003
to
6b53427
Compare
public void shouldPassAllOutcomes( | ||
final String testName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method contains the try-catch with the new retry logic.
86681ad
to
3b2c915
Compare
|
||
// TODO reasons for retry | ||
// Exception in encryption library: ChangeCipherSpec message sequence violation | ||
def.retry("TODO reason") | ||
.whenFailureContains("ChangeCipherSpec message sequence violation") | ||
.test("client-side-encryption", "namedKMS-createDataKey", "create datakey with named KMIP KMS provider"); | ||
|
||
def.retry("TODO reason") | ||
.whenFailureContains("Number of checked out connections must match expected") | ||
.test("load-balancers", "cursors are correctly pinned to connections for load-balanced clusters", "pinned connections are returned after a network error during a killCursors request"); | ||
|
||
def.retry("TODO reason") | ||
.test("client-side-encryption", "namedKMS-rewrapManyDataKey", "rewrap to kmip:name1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are flaky failures from evergreen. Reasons should be specified, or these 3 retries can be removed and added in a separate PR, after examining the failures.
} | ||
if (!testDef.matchesThrowable(e)) { | ||
// if the throwable is not matched, test definitions were not intended to apply; rethrow it | ||
throw e; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this by failing an assertion within the try of shouldPassAllOutcomes
. When the assertion message matches what is specified in a def, it will ignore, ignore, and then fail with that assertion failure. When it does not match, the first instance will fail, and the remaining will be ignored.
ce1918c
to
784dc51
Compare
JAVA-5393 (part of).
See WRITING-28651
This creates N copies (attempts) of the unified tests, and places a try-catch around shouldPassAllOutcomes. If an attempt passes, ensuing attempts are ignored. Failures are ignored, except the last attempt.
This is not intended to fully resolve the issue, but is a low-cost fix that should reduce failing tests.