commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r898837 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java
Date Wed, 13 Jan 2010 17:00:36 GMT
Author: sebb
Date: Wed Jan 13 17:00:35 2010
New Revision: 898837

URL: http://svn.apache.org/viewvc?rev=898837&view=rev
Log:
Make figures line up

Modified:
    commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java

Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java?rev=898837&r1=898836&r2=898837&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java (original)
+++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java Wed
Jan 13 17:00:35 2010
@@ -769,15 +769,15 @@
                         );
                 if (expectError) {
                     if (DISPLAY_THREAD_DETAILS || (pts.length/2 != failed)){
-                        long offset = pts[0].created; // To reduce size of output numbers
+                        long offset = pts[0].created - 1000; // To reduce size of output
numbers, but ensure they have 4 digits
                         System.out.println("Offset: "+offset);
                         for (int i = 0; i < pts.length; i++) {
                             PoolTest pt = pts[i];
                             System.out.println(
                                     "Pre: " + (pt.preconnected-offset) // First, so can sort
on this easily
-                                    + ". Post: " + (pt.postconnected-offset)
+                                    + ". Post: " + (pt.connected != 0 ? Long.toString(pt.postconnected-offset):
"-")
                                     + ". Startup: " + (pt.started-pt.created)
-                                    + ". getConn(): " + (pt.connected > 0 ? Long.toString(pt.connected-pt.preconnected)
: "-")
+                                    + ". getConn(): " + (pt.connected != 0 ? Long.toString(pt.connected-pt.preconnected)
: "-")
                                     + ". Runtime: " + (pt.ended-pt.started)
                                     + ". IDX: " + i
                                     + ". Loops: " + pt.loops



Mime
View raw message