diff --git a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java index 5e2be622c..946311f4f 100644 --- a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java +++ b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java @@ -49,7 +49,6 @@ public class StopWatchTest extends AbstractLangTest { private static final Duration TWO_MILLISECOND = Duration.ofMillis(2); private static final Duration MILLIS_550 = Duration.ofMillis(550); private static final String MESSAGE = "Baking cookies"; - private static final Duration MIN_SLEEP = Duration.ofMillis(20); private static final String ZERO_HOURS_PREFIX = "00:"; private static final String ZERO_TIME_ELAPSED = "00:00:00.000"; @@ -163,7 +162,7 @@ public class StopWatchTest extends AbstractLangTest { @Test public void testFormatSplitTime() { final StopWatch watch = StopWatch.createStarted(); - ThreadUtils.sleepQuietly(MIN_SLEEP); + ThreadUtils.sleepQuietly(TWO_MILLISECOND); watch.split(); final String formatSplitTime = watch.formatSplitTime(); assertNotEquals(ZERO_TIME_ELAPSED, formatSplitTime); @@ -174,7 +173,7 @@ public class StopWatchTest extends AbstractLangTest { public void testFormatSplitTimeWithMessage() { final StopWatch watch = new StopWatch(MESSAGE); watch.start(); - ThreadUtils.sleepQuietly(MIN_SLEEP); + ThreadUtils.sleepQuietly(TWO_MILLISECOND); watch.split(); final String formatSplitTime = watch.formatSplitTime(); assertThat("formatSplitTime", formatSplitTime, not(startsWith(MESSAGE)));