Skip to content

Commit f3b9dd4

Browse files
committed
Fix racy test
1 parent 10081c2 commit f3b9dd4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ public void testNonChunkedFrontendRequest(TestContext ctx) {
118118
HttpClient httpClient = vertx.createHttpClient();
119119
httpClient
120120
.request(HttpMethod.POST, 8080, "localhost", "/somepath")
121-
.compose(req -> req.setChunked(true).send("chunk"))
122-
.compose(HttpClientResponse::body)
121+
.compose(req -> req
122+
.setChunked(true)
123+
.send("chunk")
124+
.andThen(ctx.asyncAssertSuccess(resp -> ctx.assertEquals(200, resp.statusCode())))
125+
.compose(HttpClientResponse::end))
123126
.onComplete(ctx.asyncAssertSuccess());
124127
}
125128

0 commit comments

Comments
 (0)