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, 29 Jun 2004 20:14:30 GMT
dirkv       2004/06/29 13:14:30

  Modified:    dbcp/src/test/org/apache/commons/dbcp
                        TestBasicDataSource.java
  Log:
  Bugzilla Bug 29832: Broken behaviour for BasicDataSource.setMaxActive(0)
  MaxActive == 0 should throw SQLException on getConnection
  
  Issue fixed in commons pool:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=29863
  
  Revision  Changes    Path
  1.22      +18 -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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- TestBasicDataSource.java	20 May 2004 13:08:32 -0000	1.21
  +++ TestBasicDataSource.java	29 Jun 2004 20:14:29 -0000	1.22
  @@ -281,4 +281,21 @@
           assertNotNull(conn);
           conn.close();
       }
  +    
  +    /**
  +     * Bugzilla Bug 29832: Broken behaviour for BasicDataSource.setMaxActive(0)
  +     * MaxActive == 0 should throw SQLException on getConnection
  +     */
  +    public void testMaxActiveZero() throws Exception {
  +        ds.setMaxActive(0);
  +        
  +        try {
  +            Connection conn = ds.getConnection();
  +            assertNotNull(conn);
  +            fail("SQLException expected");
  +            
  +        } catch (SQLException e) {
  +            // test OK
  +        }
  +    }
   }
  
  
  

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