You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/04/24 15:20:00 UTC

(commons-lang) branch master updated: Try and avoid test failures on GitHub CI

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 79c66ae4e Try and avoid test failures on GitHub CI
79c66ae4e is described below

commit 79c66ae4e3318e05e647e7611d181eb5d2313d04
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Apr 24 11:19:55 2024 -0400

    Try and avoid test failures on GitHub CI
---
 src/test/java/org/apache/commons/lang3/time/StopWatchTest.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 7d460c296..a4badbd35 100644
--- a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
@@ -282,18 +282,21 @@ public class StopWatchTest extends AbstractLangTest {
     public void testStopWatchSplit() throws InterruptedException {
         final StopWatch watch = StopWatch.createStarted();
         sleep(MILLIS_550);
+        // slept ~550 millis
         watch.split();
         final long splitTime = watch.getSplitTime();
         final String splitStr = watch.toSplitString();
         sleep(MILLIS_550);
+        // slept ~1100 millis
         watch.unsplit();
         sleep(MILLIS_550);
+        // slept ~1650 millis
         watch.stop();
         final long totalTime = watch.getTime();
 
         assertEquals(12, splitStr.length(), "Formatted split string not the correct length");
         assertThat("splitTime", splitTime, allOf(greaterThanOrEqualTo(500L), lessThan(700L)));
-        assertThat("totalTime", totalTime, allOf(greaterThanOrEqualTo(1500L), lessThan(2000L)));
+        assertThat("totalTime", totalTime, allOf(greaterThanOrEqualTo(1500L), lessThan(2100L)));
     }
 
     @Test