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 d43a20f35 Be lenient for slow running builds
d43a20f35 is described below

commit d43a20f352a867dc68b8b976fe3f9d6696889592
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Aug 27 11:39:19 2023 -0400

    Be lenient for slow running builds
---
 src/test/java/org/apache/commons/lang3/time/StopWatchTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 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 7d7beb699..8cb7d312e 100644
--- a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
@@ -319,11 +319,11 @@ public class StopWatchTest extends AbstractLangTest {
         watch.stop();
         final long totalTime = watch.getTime();
 
-        assertTrue(suspendTime >= 500, "suspendTime = " + suspendTime);
-        assertTrue(suspendTime < testSuspendTime, "suspendTime = " + 
suspendTime);
-        assertTrue(totalTime >= 1000, "totalTime = " + totalTime);
+        assertTrue(suspendTime >= 500, () -> "suspendTime = " + suspendTime);
+        assertTrue(suspendTime <= testSuspendTime, () -> 
String.format("suspendTime = %,d, testSuspendTime = %,d", suspendTime, 
testSuspendTime));
+        assertTrue(totalTime >= 1000, () -> "totalTime = " + totalTime);
         // Be lenient for slow running builds
-        assertTrue(totalTime < 2500, "totalTime = " + totalTime);
+        assertTrue(totalTime < 2500, () -> "totalTime = " + totalTime);
     }
 
     @Test

Reply via email to