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:
Nhat Nguyen 2020-10-02 17:31:12 -04:00
parent 69c56d55dc
commit 4ef8673fdd
1 changed files with 3 additions and 0 deletions

View File

@ -179,6 +179,9 @@ public class AsyncSearchActionIT extends AsyncSearchIntegTestCase {
try (SearchResponseIterator it =
assertBlockingIterator(indexName, numShards, new SearchSourceBuilder(), 0, 2)) {
initial = it.next();
while (it.hasNext()) {
it.next();
}
}
ensureTaskCompletion(initial.getId());
restartTaskNode(initial.getId(), indexName);