commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r791770 - /commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
Date Tue, 07 Jul 2009 09:42:04 GMT
Author: markt
Date: Tue Jul  7 09:42:04 2009
New Revision: 791770

URL: http://svn.apache.org/viewvc?rev=791770&view=rev
Log:
Increase the time the threads hold onto the object. Improves the test as it should ensure
that, on start, 10 threads hold objects and 20 threads block waiting for an object. Previously
not all the threads would have started before the first thread returned its object to the
pool.
This also allows the time between thread starts to be increased to ensure threads are started
in the right order and hopefully avoid some of the continuum failures we have been seeing.

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java?rev=791770&r1=791769&r2=791770&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
Tue Jul  7 09:42:04 2009
@@ -1434,12 +1434,12 @@
         // Start threads to borrow objects
         TestThread[] threads = new TestThread[numThreads];
         for(int i=0;i<numThreads;i++) {
-            threads[i] = new TestThread(pool, 1, 500, false, String.valueOf(i % maxActive));
+            threads[i] = new TestThread(pool, 1, 2000, false, String.valueOf(i % maxActive));
             Thread t = new Thread(threads[i]);
             t.start();
             // Short delay to ensure threads start in correct order
             try {
-                Thread.sleep(20);
+                Thread.sleep(50);
             } catch (InterruptedException e) {
                 fail(e.toString());
             }



Mime
View raw message