Skip to content

Commit 8d03d3c

Browse files
committed
Fix a few racy tests
1 parent ac7abda commit 8d03d3c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/test/java/io/vertx/httpproxy/ProxyRequestTest.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ public void testChunkedFrontendRequest(TestContext ctx) {
9999
req.response().end("Hello World");
100100
}, ctx.asyncAssertSuccess());
101101
HttpClient httpClient = vertx.createHttpClient();
102-
httpClient
103-
.request(HttpMethod.GET, 8080, "localhost", "/somepath")
104-
.compose(HttpClientRequest::send)
105-
.compose(HttpClientResponse::body)
106-
.onComplete(ctx.asyncAssertSuccess());
102+
httpClient.request(HttpMethod.GET, 8080, "localhost", "/somepath")
103+
.compose(req -> req
104+
.send()
105+
.compose(HttpClientResponse::body))
106+
.onComplete(ctx.asyncAssertSuccess());
107107
}
108108

109109
@Test
@@ -136,7 +136,9 @@ public void testIllegalTransferEncodingBackendResponse(TestContext ctx) {
136136
"\r\n"), ctx.asyncAssertSuccess());
137137
HttpClient httpClient = vertx.createHttpClient();
138138
httpClient.request(HttpMethod.GET, 8080, "localhost", "/somepath")
139-
.compose(req -> req.send().compose(HttpClientResponse::body))
139+
.compose(req -> req
140+
.send()
141+
.compose(HttpClientResponse::body))
140142
.onComplete(ctx.asyncAssertSuccess());
141143
}
142144

0 commit comments

Comments
 (0)