From efc28ee5d269461a17053b50b09fa2dc506dece0 Mon Sep 17 00:00:00 2001 From: Bryce Anderson Date: Tue, 23 Jan 2024 17:37:29 -0700 Subject: [PATCH] WIP: try to consistantly repro the flaky JavaNetSoTimeoutHttpConnectionFilterTest test --- .../netty/JavaNetSoTimeoutHttpConnectionFilterTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/servicetalk-http-netty/src/test/java/io/servicetalk/http/netty/JavaNetSoTimeoutHttpConnectionFilterTest.java b/servicetalk-http-netty/src/test/java/io/servicetalk/http/netty/JavaNetSoTimeoutHttpConnectionFilterTest.java index 8d7e18a32f..6c7791f002 100644 --- a/servicetalk-http-netty/src/test/java/io/servicetalk/http/netty/JavaNetSoTimeoutHttpConnectionFilterTest.java +++ b/servicetalk-http-netty/src/test/java/io/servicetalk/http/netty/JavaNetSoTimeoutHttpConnectionFilterTest.java @@ -35,6 +35,7 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.junit.jupiter.params.ParameterizedTest; @@ -164,11 +165,17 @@ void noTimeout(boolean expectContinue, boolean withServerDelays, boolean withZer if (withZeroTimeout) { request.context().put(READ_TIMEOUT_KEY, Duration.ZERO); } - HttpResponse response = client().request(request); + HttpResponse response = client().request(request); // this is the line that is failing due to test timeout. assertThat(response.status(), is(OK)); assertThat(response.payloadBody().toString(US_ASCII), is(equalTo("HelloWorld"))); } + @RepeatedTest(1000) + void noTimeout() throws Exception { + // This is the failing test case. https://github.com/apple/servicetalk/issues/2687 + noTimeout(true, false, false); + } + @ParameterizedTest(name = "{displayName} [{index}]: expectContinue={0} withServerDelays={1}") @CsvSource({"false,false", "false,true", "true,false", "true,true"}) void noTimeoutStreaming(boolean expectContinue, boolean withServerDelays) throws Exception {