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 2021/08/13 13:12:42 UTC
[commons-pool] branch master updated: Test old and new APIs.
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 4740044 Test old and new APIs.
4740044 is described below
commit 4740044e38744fd4b3a736de4462a987997c2355
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 13 09:12:40 2021 -0400
Test old and new APIs.
---
.../org/apache/commons/pool2/impl/TestDefaultPooledObject.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java b/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
index 3202282..49ae9fa 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
@@ -91,14 +91,18 @@ public class TestDefaultPooledObject {
final ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 3);
final Runnable allocateAndDeallocateTask = () -> {
for (int i1 = 0; i1 < 10000; i1++) {
- if (dpo.getIdleTime().isNegative()) {
+ if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
+ negativeIdleTimeReturned.set(true);
+ break;
+ }
+ if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
negativeIdleTimeReturned.set(true);
break;
}
}
dpo.allocate();
for (int i2 = 0; i2 < 10000; i2++) {
- if (dpo.getIdleTime().isNegative()) {
+ if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
negativeIdleTimeReturned.set(true);
break;
}
@@ -107,7 +111,7 @@ public class TestDefaultPooledObject {
};
final Runnable getIdleTimeTask = () -> {
for (int i = 0; i < 10000; i++) {
- if (dpo.getIdleTime().isNegative()) {
+ if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
negativeIdleTimeReturned.set(true);
break;
}