Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,16 @@ public void testClientConnectionCloseMidStream() throws Exception {
var handler = ctx.awaitRestChannelAccepted(opaqueId);
assertBusy(() -> assertNotNull(handler.stream.buf()));

// enable auto-read to receive channel close event
handler.stream.channel().config().setAutoRead(true);
assertFalse(handler.streamClosed);

// terminate connection and wait resources are released
// terminate client connection
ctx.clientChannel.close();
// read the first half of the request
handler.stream.next();
// attempt to read more data and it should notice channel being closed eventually
handler.stream.next();

// wait for resources to be released
assertBusy(() -> {
assertNull(handler.stream.buf());
assertTrue(handler.streamClosed);
Expand Down