File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4 Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -111,9 +111,7 @@ public void testMixedValidationResults() {
111111 channel .writeInbound (last );
112112 if (shouldPassValidation ) {
113113 assertEquals ("should pass content for valid request" , content , channel .readInbound ());
114- content .release ();
115114 assertEquals (last , channel .readInbound ());
116- last .release ();
117115 } else {
118116 assertNull ("should drop content for invalid request" , channel .readInbound ());
119117 }
@@ -140,7 +138,7 @@ public void testIgnoreReadWhenValidating() {
140138 assertNull ("content should not pass yet, need explicit read" , channel .readInbound ());
141139
142140 channel .read ();
143- asInstanceOf ( LastHttpContent . class , channel .readInbound ()). release ( );
141+ assertTrue ( channel .readInbound () instanceof LastHttpContent );
144142 }
145143
146144 public void testWithFlowControlAndAggregator () {
@@ -159,8 +157,9 @@ public void testWithFlowControlAndAggregator() {
159157 validationRequest .listener .onResponse (null );
160158 channel .runPendingTasks ();
161159
162- asInstanceOf ( FullHttpRequest . class , channel .readInbound ()). release ( );
160+ assertTrue ( channel .readInbound () instanceof FullHttpRequest );
163161 }
164162
165163 record ValidationRequest (HttpRequest request , Channel channel , ActionListener <Void > listener ) {}
164+
166165}
You can’t perform that action at this time.
0 commit comments