@@ -111,7 +111,9 @@ public void testMixedValidationResults() {
111111 channel .writeInbound (last );
112112 if (shouldPassValidation ) {
113113 assertEquals ("should pass content for valid request" , content , channel .readInbound ());
114+ content .release ();
114115 assertEquals (last , channel .readInbound ());
116+ last .release ();
115117 } else {
116118 assertNull ("should drop content for invalid request" , channel .readInbound ());
117119 }
@@ -138,7 +140,10 @@ public void testIgnoreReadWhenValidating() {
138140 assertNull ("content should not pass yet, need explicit read" , channel .readInbound ());
139141
140142 channel .read ();
141- assertTrue (channel .readInbound () instanceof LastHttpContent );
143+ var lastContent = channel .readInbound ();
144+ assertTrue (lastContent instanceof LastHttpContent );
145+ ((LastHttpContent ) lastContent ).release ();
146+
142147 }
143148
144149 public void testWithFlowControlAndAggregator () {
@@ -157,9 +162,10 @@ public void testWithFlowControlAndAggregator() {
157162 validationRequest .listener .onResponse (null );
158163 channel .runPendingTasks ();
159164
160- assertTrue (channel .readInbound () instanceof FullHttpRequest );
165+ var fullReq = channel .readInbound ();
166+ assertTrue (fullReq instanceof FullHttpRequest );
167+ ((FullHttpRequest ) fullReq ).release ();
161168 }
162169
163170 record ValidationRequest (HttpRequest request , Channel channel , ActionListener <Void > listener ) {}
164-
165171}
0 commit comments