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-pool.git
The following commit(s) were added to refs/heads/master by this push: new fdc87a3a Account for unit test rare failure seen IRL in 2.x branch fdc87a3a is described below commit fdc87a3aa4e13e6416443821cdb0815eaf964898 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Dec 1 15:42:06 2024 -0500 Account for unit test rare failure seen IRL in 2.x branch --- .../java/org/apache/commons/pool3/impl/TestGenericObjectPool.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java index 184a6db4..94ee7a57 100644 --- a/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java @@ -1088,7 +1088,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { "borrowObject must fail quickly due to timeout parameter")); final long millis = d.toMillis(); final long nanos = d.toNanos(); - assertTrue(nanos > 0, () -> "borrowObject(Duration) argument not respected: " + nanos); + assertTrue(nanos >= 0, () -> "borrowObject(Duration) argument not respected: " + nanos); assertTrue(millis >= 0, () -> "borrowObject(Duration) argument not respected: " + millis); // not > 0 to account for spurious waits assertTrue(millis < 50, () -> "borrowObject(Duration) argument not respected: " + millis); } @@ -1111,7 +1111,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { "borrowObject must fail slowly due to timeout parameter")); final long millis = d.toMillis(); final long nanos = d.toNanos(); - assertTrue(nanos > 0, () -> "borrowObject(Duration) argument not respected: " + nanos); + assertTrue(nanos >= 0, () -> "borrowObject(Duration) argument not respected: " + nanos); assertTrue(millis >= 0, () -> "borrowObject(Duration) argument not respected: " + millis); // not > 0 to account for spurious waits assertTrue(millis < 600, () -> "borrowObject(Duration) argument not respected: " + millis); assertTrue(millis > 490, () -> "borrowObject(Duration) argument not respected: " + millis);