Fix testRestartAfterCompletion (#63211)
We need to complete the search before closing the iterator, which internally closes the point in time; otherwise, the search will fail with a missing context error. Closes #62451
This commit is contained in:
parent
69c56d55dc
commit
4ef8673fdd
|
@ -179,6 +179,9 @@ public class AsyncSearchActionIT extends AsyncSearchIntegTestCase {
|
||||||
try (SearchResponseIterator it =
|
try (SearchResponseIterator it =
|
||||||
assertBlockingIterator(indexName, numShards, new SearchSourceBuilder(), 0, 2)) {
|
assertBlockingIterator(indexName, numShards, new SearchSourceBuilder(), 0, 2)) {
|
||||||
initial = it.next();
|
initial = it.next();
|
||||||
|
while (it.hasNext()) {
|
||||||
|
it.next();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ensureTaskCompletion(initial.getId());
|
ensureTaskCompletion(initial.getId());
|
||||||
restartTaskNode(initial.getId(), indexName);
|
restartTaskNode(initial.getId(), indexName);
|
||||||
|
|
Loading…
Reference in New Issue