Skip to content

Commit 757468a

Browse files
committed
fixes flaky test IdleRatioScanPrioritizerTest (apache#5815)
Increased the run time numerator in the test so that changes in the idle denominator caused by differing test execution times does not fail the test. fixes apache#5809
1 parent 24c52e5 commit 757468a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/src/test/java/org/apache/accumulo/core/spi/scan/IdleRatioScanPrioritizerTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ public void testSort() {
4141
// Two following have never run, so oldest should go first
4242
scans.add(new TestScanInfo("a", Type.SINGLE, now - 3));
4343
scans.add(new TestScanInfo("b", Type.SINGLE, now - 8));
44-
// Two following have different idle ratio and same last run times
45-
scans.add(new TestScanInfo("c", Type.SINGLE, now - 16, 2, 10));
46-
scans.add(new TestScanInfo("d", Type.SINGLE, now - 16, 5, 10));
44+
// Two following have different idle ratio and same last run times. Give these larger run times
45+
// than e and f so they always come after e and f as the idle time varies.
46+
scans.add(new TestScanInfo("c", Type.SINGLE, now - 16, 2, 20));
47+
scans.add(new TestScanInfo("d", Type.SINGLE, now - 16, 5, 20));
4748
// Two following have same idle ratio and different last run times
4849
scans.add(new TestScanInfo("e", Type.SINGLE, now - 12, 5, 9));
4950
scans.add(new TestScanInfo("f", Type.SINGLE, now - 12, 3, 7));

0 commit comments

Comments
 (0)