commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp TestBasicDataSource.java
Date Thu, 20 May 2004 13:08:32 GMT
dirkv       2004/05/20 06:08:32

  Modified:    dbcp/src/test/org/apache/commons/dbcp
                        TestBasicDataSource.java
  Log:
  Testcase for Bugzilla Bug 29055: AutoCommit and ReadOnly
  The DaffodilDB driver throws an SQLException if trying to commit or rollback a readOnly
connection.
  
  Revision  Changes    Path
  1.21      +15 -1     jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestBasicDataSource.java
  
  Index: TestBasicDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestBasicDataSource.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TestBasicDataSource.java	18 May 2004 22:01:10 -0000	1.20
  +++ TestBasicDataSource.java	20 May 2004 13:08:32 -0000	1.21
  @@ -267,4 +267,18 @@
           assertEquals(false, ds.connectionPool.getTestWhileIdle());
           assertEquals(true, ds.connectionPool.getTestOnReturn());
       }
  +    
  +    /**
  +     * Bugzilla Bug 29055: AutoCommit and ReadOnly
  +     * The DaffodilDB driver throws an SQLException if 
  +     * trying to commit or rollback a readOnly connection. 
  +     */
  +    public void testRollbackReadOnly() throws Exception {
  +        ds.setDefaultReadOnly(true);
  +        ds.setDefaultAutoCommit(false);
  +        
  +        Connection conn = ds.getConnection();
  +        assertNotNull(conn);
  +        conn.close();
  +    }
   }
  
  
  

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


Mime
View raw message