[TEST] Now actually wait for merges

Relates to #27651
This commit is contained in:
Simon Willnauer 2017-12-08 12:35:02 +01:00
parent 952c859f52
commit 8f104cc08c
1 changed files with 1 additions and 1 deletions

View File

@ -2856,7 +2856,7 @@ public class IndexShardTests extends IndexShardTestCase {
// We need to wait for all ongoing merges to complete. The reason is that during a merge the // We need to wait for all ongoing merges to complete. The reason is that during a merge the
// IndexWriter holds the core cache key open and causes the memory to be registered in the breaker // IndexWriter holds the core cache key open and causes the memory to be registered in the breaker
primary.forceMerge(new ForceMergeRequest()); primary.forceMerge(new ForceMergeRequest().maxNumSegments(1).flush(true));
// Close remaining searchers // Close remaining searchers
IOUtils.close(searchers); IOUtils.close(searchers);