File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
server/src/test/java/org/elasticsearch/index/engine Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -493,7 +493,7 @@ public void testMergesRunConcurrently() throws Exception {
493493 // at least 1 extra merge than there are concurrently allowed
494494 int mergeCount = mergeExecutorThreadCount + randomIntBetween (1 , 10 );
495495 Semaphore runMergeSemaphore = new Semaphore (0 );
496- for (int i = 1 ; i <= mergeCount ; i ++) {
496+ for (int i = 0 ; i < mergeCount ; i ++) {
497497 MergeSource mergeSource = mock (MergeSource .class );
498498 OneMerge oneMerge = mock (OneMerge .class );
499499 when (oneMerge .getStoreMergeInfo ()).thenReturn (getNewMergeInfo (randomLongBetween (1L , 10L )));
@@ -509,7 +509,7 @@ public void testMergesRunConcurrently() throws Exception {
509509 threadPoolMergeScheduler .merge (mergeSource , randomFrom (MergeTrigger .values ()));
510510
511511 // verify queued byte metric is recorded for each merge
512- verify (mergeMetrics , times (i )).incrementQueuedMergeBytes (any (), anyLong ());
512+ verify (mergeMetrics , times (i + 1 )).incrementQueuedMergeBytes (any (), anyLong ());
513513 }
514514
515515 for (int completedMergesCount = 0 ; completedMergesCount < mergeCount
You can’t perform that action at this time.
0 commit comments