Created
August 23, 2019 13:35
-
-
Save vietj/9c485ca24bdc3270b520ec46c926c324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testCloseHandlerWhenConnectionEnds() throws Exception { | |
server.requestHandler(req -> { | |
req.response().closeHandler(v -> { | |
testComplete(); | |
}); | |
req.response().setChunked(true).write("some-data"); | |
}); | |
startServer(testAddress); | |
client.request(HttpMethod.GET, testAddress, DEFAULT_HTTP_PORT, DEFAULT_HTTP_HOST, "/somepath", resp -> { | |
resp.handler(v -> { | |
resp.request().connection().close(); | |
}); | |
}).end(); | |
await(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment