File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4 Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -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,7 @@ 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+ asInstanceOf ( LastHttpContent . class , channel .readInbound ()). release ( );
142144 }
143145
144146 public void testWithFlowControlAndAggregator () {
@@ -157,9 +159,8 @@ public void testWithFlowControlAndAggregator() {
157159 validationRequest .listener .onResponse (null );
158160 channel .runPendingTasks ();
159161
160- assertTrue ( channel .readInbound () instanceof FullHttpRequest );
162+ asInstanceOf ( FullHttpRequest . class , channel .readInbound ()). release ( );
161163 }
162164
163165 record ValidationRequest (HttpRequest request , Channel channel , ActionListener <Void > listener ) {}
164-
165166}
You can’t perform that action at this time.
0 commit comments