File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
server/src/test/java/org/elasticsearch/index/engine Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -390,11 +390,13 @@ public void testMergeSourceWithFollowUpMergesRunSequentially() throws Exception
390390 }).when (mergeSource ).merge (any (OneMerge .class ));
391391 // trigger run merges on the merge source
392392 threadPoolMergeScheduler .merge (mergeSource , randomFrom (MergeTrigger .values ()));
393- do {
393+ boolean done = false ;
394+ while (done == false ) {
394395 // let merges run, but wait for the in-progress one to signal it is running
395396 nextMergeSemaphore .acquire ();
397+ done = runMergeIdx .get () >= followUpMergeCount ;
396398 runMergeSemaphore .release ();
397- } while ( runMergeIdx . get () < followUpMergeCount );
399+ }
398400 assertBusy (() -> assertTrue (threadPoolMergeExecutorService .allDone ()));
399401 }
400402 }
You can’t perform that action at this time.
0 commit comments