Skip to content

Commit

Permalink
Tests: clean search scroll at the end of SearchCancellationIT
Browse files Browse the repository at this point in the history
Under some rare conditions search cancellation response might not fully clean scroll context. For now this commit adds the cleaning operation to the test, and we will address the root cause in #21511
  • Loading branch information
imotov committed Nov 11, 2016
1 parent 0f15b79 commit 0b2b64b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ public void testCancellationOfScrollSearches() throws Exception {
awaitForBlock(plugins);
cancelSearch(SearchAction.NAME);
disableBlocks(plugins);
ensureSearchWasCancelled(searchResponse);
SearchResponse response = ensureSearchWasCancelled(searchResponse);
if (response != null) {
// The response might not have failed on all shards - we need to clean scroll
logger.info("Cleaning scroll with id {}", response.getScrollId());
client().prepareClearScroll().addScrollId(response.getScrollId()).get();
}
}


Expand Down

0 comments on commit 0b2b64b

Please sign in to comment.