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 @@ -111,7 +111,9 @@ public void testMixedValidationResults() {
channel.writeInbound(last);
if (shouldPassValidation) {
assertEquals("should pass content for valid request", content, channel.readInbound());
content.release();
assertEquals(last, channel.readInbound());
last.release();
} else {
assertNull("should drop content for invalid request", channel.readInbound());
}
Expand All @@ -138,7 +140,7 @@ public void testIgnoreReadWhenValidating() {
assertNull("content should not pass yet, need explicit read", channel.readInbound());

channel.read();
assertTrue(channel.readInbound() instanceof LastHttpContent);
asInstanceOf(LastHttpContent.class, channel.readInbound()).release();
}

public void testWithFlowControlAndAggregator() {
Expand All @@ -157,9 +159,8 @@ public void testWithFlowControlAndAggregator() {
validationRequest.listener.onResponse(null);
channel.runPendingTasks();

assertTrue(channel.readInbound() instanceof FullHttpRequest);
asInstanceOf(FullHttpRequest.class, channel.readInbound()).release();
}

record ValidationRequest(HttpRequest request, Channel channel, ActionListener<Void> listener) {}

}