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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to