File tree 1 file changed +3
-4
lines changed
modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -111,9 +111,7 @@ public void testMixedValidationResults() {
111
111
channel .writeInbound (last );
112
112
if (shouldPassValidation ) {
113
113
assertEquals ("should pass content for valid request" , content , channel .readInbound ());
114
- content .release ();
115
114
assertEquals (last , channel .readInbound ());
116
- last .release ();
117
115
} else {
118
116
assertNull ("should drop content for invalid request" , channel .readInbound ());
119
117
}
@@ -140,7 +138,7 @@ public void testIgnoreReadWhenValidating() {
140
138
assertNull ("content should not pass yet, need explicit read" , channel .readInbound ());
141
139
142
140
channel .read ();
143
- asInstanceOf ( LastHttpContent . class , channel .readInbound ()). release ( );
141
+ assertTrue ( channel .readInbound () instanceof LastHttpContent );
144
142
}
145
143
146
144
public void testWithFlowControlAndAggregator () {
@@ -159,8 +157,9 @@ public void testWithFlowControlAndAggregator() {
159
157
validationRequest .listener .onResponse (null );
160
158
channel .runPendingTasks ();
161
159
162
- asInstanceOf ( FullHttpRequest . class , channel .readInbound ()). release ( );
160
+ assertTrue ( channel .readInbound () instanceof FullHttpRequest );
163
161
}
164
162
165
163
record ValidationRequest (HttpRequest request , Channel channel , ActionListener <Void > listener ) {}
164
+
166
165
}
You can’t perform that action at this time.
0 commit comments