This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push: new b23c2d383 Faster StopWatchTest b23c2d383 is described below commit b23c2d3836cf8dac4a031165732bb5bc85d84b9b Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed Sep 4 11:35:56 2024 -0400 Faster StopWatchTest - testFormatSplitTime() - testFormatSplitTimeWithMessage() --- src/test/java/org/apache/commons/lang3/time/StopWatchTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)));