@@ -533,7 +533,7 @@ public void testAbortingOrRunningMergeTaskHoldsUpBudget() throws Exception {
533
533
aFileStore .totalSpace = randomLongBetween (1_000L , 10_000L );
534
534
bFileStore .totalSpace = randomLongBetween (1_000L , 10_000L );
535
535
aFileStore .usableSpace = randomLongBetween (900L , aFileStore .totalSpace );
536
- bFileStore .usableSpace = randomLongBetween (900L , bFileStore .totalSpace );
536
+ bFileStore .usableSpace = randomValueOtherThan ( aFileStore . usableSpace , () -> randomLongBetween (900L , bFileStore .totalSpace ) );
537
537
boolean aHasMoreSpace = aFileStore .usableSpace > bFileStore .usableSpace ;
538
538
try (
539
539
ThreadPoolMergeExecutorService threadPoolMergeExecutorService = ThreadPoolMergeExecutorService
@@ -611,7 +611,7 @@ public void testBackloggedMergeTasksDoNotHoldUpBudget() throws Exception {
611
611
aFileStore .totalSpace = randomLongBetween (1_000L , 10_000L );
612
612
bFileStore .totalSpace = randomLongBetween (1_000L , 10_000L );
613
613
aFileStore .usableSpace = randomLongBetween (900L , aFileStore .totalSpace );
614
- bFileStore .usableSpace = randomLongBetween (900L , bFileStore .totalSpace );
614
+ bFileStore .usableSpace = randomValueOtherThan ( aFileStore . usableSpace , () -> randomLongBetween (900L , bFileStore .totalSpace ) );
615
615
boolean aHasMoreSpace = aFileStore .usableSpace > bFileStore .usableSpace ;
616
616
try (
617
617
ThreadPoolMergeExecutorService threadPoolMergeExecutorService = ThreadPoolMergeExecutorService
@@ -896,7 +896,7 @@ public void testEnqueuedMergeTasksAreUnblockedWhenEstimatedMergeSizeChanges() th
896
896
long diskSpaceLimitBytes = randomLongBetween (10L , 100L );
897
897
aFileStore .usableSpace = diskSpaceLimitBytes + randomLongBetween (1L , 100L );
898
898
aFileStore .totalSpace = aFileStore .usableSpace + randomLongBetween (1L , 10L );
899
- bFileStore .usableSpace = diskSpaceLimitBytes + randomLongBetween (1L , 100L );
899
+ bFileStore .usableSpace = randomValueOtherThan ( aFileStore . usableSpace , () -> diskSpaceLimitBytes + randomLongBetween (1L , 100L ) );
900
900
bFileStore .totalSpace = bFileStore .usableSpace + randomLongBetween (1L , 10L );
901
901
boolean aHasMoreSpace = aFileStore .usableSpace > bFileStore .usableSpace ;
902
902
Settings .Builder settingsBuilder = Settings .builder ().put (settings );
@@ -996,7 +996,10 @@ public void testMergeTasksAreUnblockedWhenMoreDiskSpaceBecomesAvailable() throws
996
996
bFileStore .totalSpace = randomLongBetween (300L , 1_000L );
997
997
long grantedUsableSpaceBuffer = randomLongBetween (10L , 50L );
998
998
aFileStore .usableSpace = randomLongBetween (200L , aFileStore .totalSpace - grantedUsableSpaceBuffer );
999
- bFileStore .usableSpace = randomLongBetween (200L , bFileStore .totalSpace - grantedUsableSpaceBuffer );
999
+ bFileStore .usableSpace = randomValueOtherThan (
1000
+ aFileStore .usableSpace ,
1001
+ () -> randomLongBetween (200L , bFileStore .totalSpace - grantedUsableSpaceBuffer )
1002
+ );
1000
1003
boolean aHasMoreSpace = aFileStore .usableSpace > bFileStore .usableSpace ;
1001
1004
Settings .Builder settingsBuilder = Settings .builder ().put (settings );
1002
1005
// change the watermark level, just for coverage and it's easier with the calculations
0 commit comments