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 2022/08/30 21:25:39 UTC

[commons-pool] branch master updated (f75db54a -> 9793b385)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


    from f75db54a We don't use author tags
     new dc8a9abf Javadoc
     new c0ea9114 Use scale in test names
     new 9793b385 Be a little more patient for slow builds

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../pool2/impl/TestAbandonedKeyedObjectPool.java   | 27 ++++++++++++----------
 1 file changed, 15 insertions(+), 12 deletions(-)


[commons-pool] 03/03: Be a little more patient for slow builds

Posted by gg...@apache.org.
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

commit 9793b3854f37a8d5b2c2b9f752c0ab4553ccb0e0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 30 17:25:34 2022 -0400

    Be a little more patient for slow builds
---
 .../org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
index 7c59c314..c99348dd 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
@@ -183,7 +183,7 @@ public class TestAbandonedKeyedObjectPool {
             msg.append('\n');
             mbs.unregisterMBean(name);
         }
-        assertEquals( 0, registeredPoolCount,msg.toString());
+        assertEquals(0, registeredPoolCount,msg.toString());
     }
 
     /**
@@ -214,6 +214,9 @@ public class TestAbandonedKeyedObjectPool {
         if (!pool.getKeys().contains(0)) {
             Thread.sleep(1000); // Wait a little more.
         }
+        if (!pool.getKeys().contains(0)) {
+            Thread.sleep(1000); // Wait a little more.
+        }
         pool.invalidateObject(0, obj);  // Should not trigger another destroy / decrement
         Thread.sleep(2000);          // give evictor time to finish destroys
         assertEquals(0, pool.getNumActive());


[commons-pool] 02/03: Use scale in test names

Posted by gg...@apache.org.
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

commit c0ea911402d25cd5d77314a29f09a8c45f7ba6ef
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 30 17:22:13 2022 -0400

    Use scale in test names
---
 .../pool2/impl/TestAbandonedKeyedObjectPool.java     | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
index a91c8d2f..7c59c314 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
@@ -80,17 +80,17 @@ public class TestAbandonedKeyedObjectPool {
 
     private static class SimpleFactory implements KeyedPooledObjectFactory<Integer, PooledTestObject, InterruptedException> {
 
-        private final long destroyLatency;
-        private final long validateLatency;
+        private final long destroyLatencyMillis;
+        private final long validateLatencyMillis;
 
         public SimpleFactory() {
-            destroyLatency = 0;
-            validateLatency = 0;
+            destroyLatencyMillis = 0;
+            validateLatencyMillis = 0;
         }
 
-        public SimpleFactory(final long destroyLatency, final long validateLatency) {
-            this.destroyLatency = destroyLatency;
-            this.validateLatency = validateLatency;
+        public SimpleFactory(final long destroyLatencyMillis, final long validateLatencyMillis) {
+            this.destroyLatencyMillis = destroyLatencyMillis;
+            this.validateLatencyMillis = validateLatencyMillis;
         }
 
         @Override
@@ -109,8 +109,8 @@ public class TestAbandonedKeyedObjectPool {
             // while destroying instances, yield control to other threads
             // helps simulate threading errors
             Thread.yield();
-            if (destroyLatency != 0) {
-                Thread.sleep(destroyLatency);
+            if (destroyLatencyMillis != 0) {
+                Thread.sleep(destroyLatencyMillis);
             }
             obj.getObject().destroy(destroyMode);
         }
@@ -127,7 +127,7 @@ public class TestAbandonedKeyedObjectPool {
 
         @Override
         public boolean validateObject(final Integer key, final PooledObject<PooledTestObject> obj) {
-            Waiter.sleepQuietly(validateLatency);
+            Waiter.sleepQuietly(validateLatencyMillis);
             return true;
         }
     }


[commons-pool] 01/03: Javadoc

Posted by gg...@apache.org.
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

commit dc8a9abf9bbac52d81e40b3cc34443e6497dbf48
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 30 17:18:51 2022 -0400

    Javadoc
---
 .../org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
index 9f85c6dc..a91c8d2f 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 /**
- * TestCase for AbandonedObjectPool
+ * Tests for {@link AbandonedConfig}.
  */
 public class TestAbandonedKeyedObjectPool {