Skip to content

Commit 8f104cc

Browse files
committed
[TEST] Now actually wait for merges
Relates to #27651
1 parent 952c859 commit 8f104cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2856,7 +2856,7 @@ public void testSegmentMemoryTrackedWithRandomSearchers() throws Exception {
28562856

28572857
// We need to wait for all ongoing merges to complete. The reason is that during a merge the
28582858
// IndexWriter holds the core cache key open and causes the memory to be registered in the breaker
2859-
primary.forceMerge(new ForceMergeRequest());
2859+
primary.forceMerge(new ForceMergeRequest().maxNumSegments(1).flush(true));
28602860

28612861
// Close remaining searchers
28622862
IOUtils.close(searchers);

0 commit comments

Comments
 (0)