Be lenient for slow running builds
This commit is contained in:
parent
43d225464e
commit
d0fd31f505
|
@ -423,7 +423,7 @@ public class StopWatchTest extends AbstractLangTest {
|
||||||
() -> String.format("totalDuration >= sleepMillisX2", totalDuration, sleepMillisX2));
|
() -> String.format("totalDuration >= sleepMillisX2", totalDuration, sleepMillisX2));
|
||||||
;
|
;
|
||||||
// Be lenient for slow running builds
|
// Be lenient for slow running builds
|
||||||
final long testTooLongMillis = sleepMillis * 5;
|
final long testTooLongMillis = sleepMillis * 100;
|
||||||
assertTrue(totalTimeFromNanos < testTooLongMillis,
|
assertTrue(totalTimeFromNanos < testTooLongMillis,
|
||||||
() -> String.format("totalTimeFromNanos %s < testTooLongMillis %s", totalTimeFromNanos, testTooLongMillis));
|
() -> String.format("totalTimeFromNanos %s < testTooLongMillis %s", totalTimeFromNanos, testTooLongMillis));
|
||||||
assertTrue(totalDuration.compareTo(Duration.ofMillis(testTooLongMillis)) < 0,
|
assertTrue(totalDuration.compareTo(Duration.ofMillis(testTooLongMillis)) < 0,
|
||||||
|
|
Loading…
Reference in New Issue