Tests: clean search scroll at the end of SearchCancellationIT
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 https://github.com/elastic/elasticsearch/issues/21511
This commit is contained in:
parent
1fde26347a
commit
058b6e019c
|
@ -193,7 +193,12 @@ public class SearchCancellationIT extends ESIntegTestCase {
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue