commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r899189 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp/TestConnectionPool.java
Date Thu, 14 Jan 2010 13:24:48 GMT
Author: sebb
Date: Thu Jan 14 13:24:47 2010
New Revision: 899189

URL: http://svn.apache.org/viewvc?rev=899189&view=rev
Log:
Use hash of innermostDelegate to show connection reuse

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=899189&r1=899188&r2=899189&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 Thu
Jan 14 13:24:47 2010
@@ -781,9 +781,9 @@
                             System.out.println(
                                     "Pre: " + (pt.preconnected-offset) // First, so can sort
on this easily
                                     + ". Post: " + (pt.postconnected != 0 ? Long.toString(pt.postconnected-offset):
"-")
+                                    + ". Hash: " + pt.connHash
                                     + ". Startup: " + (pt.started-pt.created)
                                     + ". getConn(): " + (pt.connected != 0 ? Long.toString(pt.connected-pt.preconnected)
: "-")
-                                    + ". Hash: " + pt.connHash
                                     + ". Runtime: " + (pt.ended-pt.started)
                                     + ". IDX: " + i
                                     + ". Loops: " + pt.loops
@@ -864,7 +864,7 @@
                     state = "Getting Connection";
                     preconnected = timeStamp();
                     Connection conn = getConnection();
-                    connHash = System.identityHashCode(conn);
+                    connHash = System.identityHashCode(((DelegatingConnection)conn).getInnermostDelegate());
                     connected = timeStamp();
                     state = "Using Connection";
                     assertNotNull(conn);



Mime
View raw message