Skip to content

Commit

Permalink
[test] Increase the timeout for the flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed May 20, 2024
1 parent 8dd03e1 commit eafbfef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ void testExpectErrorWhenConnectionClosed() throws Exception {
.uri("/")
.responseContent())
.expectError(PrematureCloseException.class)
.verify(Duration.ofSeconds(5));
.verify(Duration.ofSeconds(10));

assertThat(latch.await(30, TimeUnit.SECONDS)).isTrue();
assertThat(error.get()).isInstanceOf(AbortedException.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import java.util.function.Function;

import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import static reactor.netty.Metrics.ACTIVE_CONNECTIONS;
import static reactor.netty.Metrics.ACTIVE_STREAMS;
import static reactor.netty.Metrics.MAX_CONNECTIONS;
Expand Down Expand Up @@ -301,6 +302,11 @@ void testConnectionPoolPendingAcquireSize(long disposeTimeoutMillis) throws Exce

assertThat(latch.await(30, TimeUnit.SECONDS)).isTrue();

await().atMost(1000, TimeUnit.MILLISECONDS)
.with()
.pollInterval(50, TimeUnit.MILLISECONDS)
.untilAsserted(() -> assertGauge(registry, name, NAME, "http2.testConnectionPoolPendingAcquireSize").hasValueEqualTo(0));

assertGauge(registry, name, NAME, "http2.testConnectionPoolPendingAcquireSize").hasValueEqualTo(0);
}
finally {
Expand Down

0 comments on commit eafbfef

Please sign in to comment.