Skip to content

Commit f25e10e

Browse files
authored
Fix ChangePointOperatorTests.testSimpleFinishClose (elastic#128673)
* Unmute ChangePointOperatorTests.testSimpleFinishClose after the underlying problem has been fixed. * Backport elastic#122245 to 8.19
1 parent 8525d37 commit f25e10e

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,6 @@ tests:
455455
- class: org.elasticsearch.xpack.esql.plugin.DataNodeRequestSenderIT
456456
method: testSearchWhileRelocating
457457
issue: https://github.com/elastic/elasticsearch/issues/127188
458-
- class: org.elasticsearch.compute.operator.ChangePointOperatorTests
459-
method: testSimpleFinishClose
460-
issue: https://github.com/elastic/elasticsearch/issues/127106
461458
- class: org.elasticsearch.search.CCSDuelIT
462459
method: testTerminateAfter
463460
issue: https://github.com/elastic/elasticsearch/issues/126085

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)