Skip to content

Commit

Permalink
Fix testRestartAfterCompletion (elastic#63211)
Browse files Browse the repository at this point in the history
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 elastic#62451
  • Loading branch information
dnhatn committed Oct 2, 2020
1 parent 69c56d5 commit 4ef8673
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ public void testRestartAfterCompletion() throws Exception {
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);
Expand Down

0 comments on commit 4ef8673

Please sign in to comment.