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