commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r791286 - /commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
Date Sun, 05 Jul 2009 17:57:20 GMT
Author: markt
Date: Sun Jul  5 17:57:20 2009
New Revision: 791286

URL: http://svn.apache.org/viewvc?rev=791286&view=rev
Log:
Update to POOL-146 test case
Note to self. First you click save, *then* you commit...

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

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java?rev=791286&r1=791285&r2=791286&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java
Sun Jul  5 17:57:20 2009
@@ -1322,11 +1322,12 @@
         pool.setMaxActive(1);
         pool.setMaxTotal(-1);
         pool.borrowObject("one");
+        long start = System.currentTimeMillis();
         // Needs to be in a separate thread as this will block
-        pool.borrowObject("one");
+        Runnable simple = new SimpleTestThread(pool, "one");
+        (new Thread(simple)).run();
         // This should be almost instant. If it isn't it means this thread got
         // stuck behind the thread created above which is bad.
-        long start = System.currentTimeMillis();
         pool.borrowObject("two");
         long end = System.currentTimeMillis();
         // If it fails it will be more than 5000ms



Mime
View raw message