Skip to content

Commit

Permalink
Increase timeouts in CallTest to reduce flakiness (#33775)
Browse files Browse the repository at this point in the history
  • Loading branch information
scwhittle authored Jan 28, 2025
1 parent b3dd0ad commit 489e75e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ public static void verifyDeterministic(Coder<?> target, String message, Iterable
}
}

public static <T> long getEncodedElementByteSizeUsingCoder(Coder<T> target, T value) throws Exception {
public static <T> long getEncodedElementByteSizeUsingCoder(Coder<T> target, T value)
throws Exception {
return target.getEncodedElementByteSize(value);
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ private static class CallerExceedsTimeout implements Caller<Request, Response> {
private final Duration timeout;

CallerExceedsTimeout(Duration timeout) {
this.timeout = timeout.plus(Duration.standardSeconds(1L));
// The timeout testing is flaky so we set a sleep time with a minute padding beyond what
// should trigger the timeout.
this.timeout = timeout.plus(Duration.standardMinutes(1L));
}

@Override
Expand Down Expand Up @@ -397,7 +399,9 @@ private static class SetupExceedsTimeout implements SetupTeardown {
private final Duration timeout;

private SetupExceedsTimeout(Duration timeout) {
this.timeout = timeout.plus(Duration.standardSeconds(1L));
// The timeout testing is flaky so we set a sleep time with a minute padding beyond what
// should trigger the timeout.
this.timeout = timeout.plus(Duration.standardMinutes(1L));
}

@Override
Expand Down Expand Up @@ -443,7 +447,9 @@ private static class TeardownExceedsTimeout implements SetupTeardown {
private final Duration timeout;

private TeardownExceedsTimeout(Duration timeout) {
this.timeout = timeout.plus(Duration.standardSeconds(1L));
// The timeout testing is flaky so we set a sleep time with a minute padding beyond what
// should trigger the timeout.
this.timeout = timeout.plus(Duration.standardMinutes(1L));
}

@Override
Expand Down

0 comments on commit 489e75e

Please sign in to comment.