Skip to content

Commit aff8611

Browse files
committed
Port commit a893aaa from Lucene 7.0.0 with additional test assumption
1 parent bd0121f commit aff8611

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Lucene.Net.Tests/Store/TestRateLimiter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ public void TestThreads()
8181
// TODO: this may false trip .... could be we can only assert that it never exceeds the max, so slow jenkins doesn't trip:
8282
double ratio = actualMBPerSec/targetMBPerSec;
8383

84-
// LUCENENET: backport commit 090b804 with test fix from Lucene 6.0.0
84+
// LUCENENET: backport commits 090b804 (Lucene 6.0.0) and a893aaa (Lucene 7.0.0) with assertion fixes for test reliability
8585
// Only enforce that it wasn't too fast; if machine is bogged down (can't schedule threads / sleep properly) then it may falsely be too slow:
86-
//assertTrue("targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec, ratio >= 0.9 && ratio <= 1.1);
86+
AssumeTrue("actualMBPerSec=" + actualMBPerSec + " targetMBPerSec=" + targetMBPerSec, 0.9 <= ratio);
8787
Assert.IsTrue(ratio <= 1.1, "targetMBPerSec=" + targetMBPerSec + " actualMBPerSec=" + actualMBPerSec);
8888
}
8989

0 commit comments

Comments
 (0)