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 daecdd18 Add testConcurrentBorrowAndClear_JiraComment17741156 daecdd18 is described below commit daecdd1839127fd98caf9edf41786bf9175c9a06 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jul 7 17:22:51 2023 -0400 Add testConcurrentBorrowAndClear_JiraComment17741156 See https://issues.apache.org/jira/browse/POOL-411?focusedCommentId=17741156&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17741156 --- .../commons/pool2/impl/TestGenericKeyedObjectPool.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java index 6da15c3f..79418893 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java @@ -1017,6 +1017,23 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { testConcurrentBorrowAndClear(threadCount, taskCount, addCount, borrowCycles, clearCycles, useYield); } + /** + * See https://issues.apache.org/jira/browse/POOL-411?focusedCommentId=17741156&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17741156 + * + * @throws TestException a test failure. + */ + @Test + public void testConcurrentBorrowAndClear_JiraComment17741156() throws TestException { + final int threadCount = 2; + final int taskCount = 2; + final int addCount = 1; + final int borrowCycles = 5_000; + final int clearCycles = 5_000; + final boolean useYield = false; + + testConcurrentBorrowAndClear(threadCount, taskCount, addCount, borrowCycles, clearCycles, useYield); + } + /** * Tests POOL-411, or least tries to reproduce the NPE, but does not. *