Skip to content

Commit

Permalink
Increase allowed cancel delay in tests to reduce flakiness.
Browse files Browse the repository at this point in the history
Currently we rarely pass this on Forge but with upcoming changes I see 2-3% flakiness and I mostly concluded at this point they are just GC noise.

PiperOrigin-RevId: 725703352
  • Loading branch information
gkdn authored and copybara-github committed Feb 11, 2025
1 parent c2b3923 commit 70f4d96
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,11 @@ private static boolean compare(String actual, String expected) {
}
}

/** The maximum delay (in ms) that we allow for calls to #isCancelled(). */
private static final int MAX_DELAY = 200;
/**
* The maximum delay (in ms) that we allow for calls to #isCancelled(). Note that we have a much
* lower delay but this number should be high enough to cover random GC events.
*/
private static final int MAX_DELAY = 250;

private static Problems transpile(ImmutableList<String> args) {
List<String> delayedCalls = new ArrayList<>();
Expand Down

0 comments on commit 70f4d96

Please sign in to comment.