Skip to content

Commit cde8493

Browse files
authored
Fix ChangePointOperatorTests.testSimpleFinishClose (#122245)
1 parent 28f51e4 commit cde8493

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/esql/compute/test/src/main/java/org/elasticsearch/compute/test/OperatorTestCase.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,16 @@ protected final void assertSimple(DriverContext context, int size) {
241241
* Tests that finish then close without calling {@link Operator#getOutput} to
242242
* retrieve a potential last page, releases all memory.
243243
*/
244-
public void testSimpleFinishClose() throws Exception {
244+
public void testSimpleFinishClose() {
245245
DriverContext driverContext = driverContext();
246246
List<Page> input = CannedSourceOperator.collectPages(simpleInput(driverContext.blockFactory(), 1));
247-
assert input.size() == 1 : "Expected single page, got: " + input;
248247
// eventually, when driverContext always returns a tracking factory, we can enable this assertion
249248
// assertThat(driverContext.blockFactory().breaker().getUsed(), greaterThan(0L));
250-
Page page = input.get(0);
251249
try (var operator = simple().get(driverContext)) {
252250
assert operator.needsInput();
253-
operator.addInput(page);
251+
for (Page page : input) {
252+
operator.addInput(page);
253+
}
254254
operator.finish();
255255
}
256256
}

0 commit comments

Comments
 (0)