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 Tue, 18 May 2004 18:41:16 GMT
dirkv       2004/05/18 11:41:16

  Modified:    dbcp/src/test/org/apache/commons/dbcp
                        TestBasicDataSource.java
  Log:
  Bugzilla Bug 29054: The BasicDataSource.setTestOnReturn(boolean) is not carried through
to the GenericObjectPool variable _testOnReturn.
  - testcase shows issue is invalid
  
  Revision  Changes    Path
  1.19      +20 -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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- TestBasicDataSource.java	1 May 2004 12:54:32 -0000	1.18
  +++ TestBasicDataSource.java	18 May 2004 18:41:16 -0000	1.19
  @@ -248,4 +248,23 @@
           
           assertEquals(0, ds.getNumActive());
       }
  +    
  +    /** 
  +     * Bugzilla Bug 29054: 
  +     * The BasicDataSource.setTestOnReturn(boolean) is not carried through to 
  +     * the GenericObjectPool variable _testOnReturn.
  +     */ 
  +    public void testPropertyTestOnReturn() throws Exception {
  +        ds.setValidationQuery("select 1 from dual");
  +        ds.setTestOnBorrow(false);
  +        ds.setTestWhileIdle(false);
  +        ds.setTestOnReturn(true);
  +        
  +        Connection conn = ds.getConnection();
  +        assertNotNull(conn);
  +        
  +        assertEquals(false, ds.getConnectionPool().getTestOnBorrow());
  +        assertEquals(false, ds.getConnectionPool().getTestWhileIdle());
  +        assertEquals(true, ds.getConnectionPool().getTestOnReturn());
  +    }
   }
  
  
  

---------------------------------------------------------------------
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