Skip to content

Commit

Permalink
WIP: try to consistantly repro the flaky JavaNetSoTimeoutHttpConnecti…
Browse files Browse the repository at this point in the history
…onFilterTest test
  • Loading branch information
bryce-anderson committed Jan 24, 2024
1 parent f3635b1 commit efc28ee
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit efc28ee

Please sign in to comment.