You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/05/17 20:36:45 UTC

cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp TestManual.java

dirkv       2004/05/17 11:36:45

  Modified:    dbcp/src/test/org/apache/commons/dbcp TestManual.java
  Log:
  Bugzilla Bug 28912: (PoolingDriver) Connection re-use conflates logical and physical connections
  - JUnit test
  (bug reported by Ken Arnold)
  
  Revision  Changes    Path
  1.19      +18 -1     jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestManual.java
  
  Index: TestManual.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestManual.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- TestManual.java	28 Feb 2004 11:47:51 -0000	1.18
  +++ TestManual.java	17 May 2004 18:36:45 -0000	1.19
  @@ -61,6 +61,7 @@
           assertNotNull(pcf);
           driver = new PoolingDriver();
           driver.registerPool("test",pool);
  +        PoolingDriver.setAccessToUnderlyingConnectionAllowed(true);
           DriverManager.registerDriver(driver);
       }
   
  @@ -68,6 +69,22 @@
           DriverManager.deregisterDriver(driver);
       }
   
  +    /** @see http://issues.apache.org/bugzilla/show_bug.cgi?id=28912 */
  +    public void testReportedBug28912() throws Exception {
  +        Connection conn1 = getConnection();
  +        assertNotNull(conn1);
  +        conn1.close();        
  +        
  +        Connection conn2 = getConnection();
  +        assertNotNull(conn2);
  +        
  +        try {
  +            conn1.close();
  +            fail("Expected SQLException");
  +        }
  +        catch (SQLException e) { }
  +    }
  +    
       /** @see http://issues.apache.org/bugzilla/show_bug.cgi?id=12400 */
       public void testReportedBug12400() throws Exception {
           ObjectPool connectionPool = new GenericObjectPool(
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org