Skip to content

Commit

Permalink
Configure initial settings for Http2ClientTimeout tests instead of co…
Browse files Browse the repository at this point in the history
…nfiguring the connection initially as it can be racy
  • Loading branch information
vietj committed Nov 15, 2023
1 parent 2349b9a commit a33a8f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/test/java/io/vertx/core/http/Http2ClientTimeoutTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public class Http2ClientTimeoutTest extends HttpClientTimeoutTest {

@Override
protected HttpServerOptions createBaseServerOptions() {
return Http2ServerTest.createHttp2ServerOptions(HttpTestBase.DEFAULT_HTTPS_PORT, HttpTestBase.DEFAULT_HTTPS_HOST);
return Http2ServerTest
.createHttp2ServerOptions(HttpTestBase.DEFAULT_HTTPS_PORT, HttpTestBase.DEFAULT_HTTPS_HOST)
.setInitialSettings(new Http2Settings().setMaxConcurrentStreams(5));
}

@Override
Expand Down
10 changes: 0 additions & 10 deletions src/test/java/io/vertx/core/http/HttpClientTimeoutTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ public void testConnectTimeoutDoesFire() throws Exception {
server.requestHandler(req -> {
req.response().end();
});
server.connectionHandler(conn -> {
if (conn.getWindowSize() != -1) {
conn.updateSettings(new Http2Settings().setMaxConcurrentStreams(5));
}
});
startServer(testAddress);
List<HttpClientRequest> requests = new ArrayList<>();
for (int i = 0;i < 5;i++) {
Expand All @@ -64,11 +59,6 @@ public void testConnectTimeoutDoesNotFire() throws Exception {
server.requestHandler(req -> {
req.response().end();
});
server.connectionHandler(conn -> {
if (conn.getWindowSize() != -1) {
conn.updateSettings(new Http2Settings().setMaxConcurrentStreams(5));
}
});
startServer(testAddress);
List<HttpClientRequest> requests = new ArrayList<>();
for (int i = 0;i < 5;i++) {
Expand Down

0 comments on commit a33a8f6

Please sign in to comment.