commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1567182 - /commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestConnectionPool.java
Date Tue, 11 Feb 2014 15:32:55 GMT
Author: sebb
Date: Tue Feb 11 15:32:54 2014
New Revision: 1567182

URL: http://svn.apache.org/r1567182
Log:
Additional tests to try and pin down Continuum test failure

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

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestConnectionPool.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestConnectionPool.java?rev=1567182&r1=1567181&r2=1567182&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestConnectionPool.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestConnectionPool.java
Tue Feb 11 15:32:54 2014
@@ -427,11 +427,18 @@ public abstract class TestConnectionPool
     }
 
     public void testAutoCommitBehavior() throws Exception {
-        Connection conn = newConnection();
-        assertNotNull("connection should not be null", conn);
-        assertTrue("autocommit should be true for conn", conn.getAutoCommit());
-        conn.setAutoCommit(false);
-        conn.close();
+        Connection conn0 = newConnection();
+        assertNotNull("connection should not be null", conn0);
+        assertTrue("autocommit should be true for conn0", conn0.getAutoCommit());
+
+        Connection conn1 = newConnection();
+        assertTrue("autocommit should be true for conn1", conn1.getAutoCommit() );
+        conn1.close();
+
+        assertTrue("autocommit should be true for conn0", conn0.getAutoCommit());
+        conn0.setAutoCommit(false);
+        assertFalse("autocommit should be false for conn0", conn0.getAutoCommit());
+        conn0.close();
 
         Connection conn2 = newConnection();
         assertTrue("autocommit should be true for conn2", conn2.getAutoCommit() );



Mime
View raw message