commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/jdbc2pool TestJdbc2PoolDataSource.java
Date Tue, 15 Apr 2003 01:56:28 GMT
dgraham     2003/04/14 18:56:28

  Modified:    dbcp/src/test/org/apache/commons/dbcp/jdbc2pool
                        TestJdbc2PoolDataSource.java
  Log:
  Added code to try and duplicate error in PR# 18905.  I was unable to reproduce
  the problem and the tests run fine.
  
  Revision  Changes    Path
  1.7       +16 -6     jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/jdbc2pool/TestJdbc2PoolDataSource.java
  
  Index: TestJdbc2PoolDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/jdbc2pool/TestJdbc2PoolDataSource.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestJdbc2PoolDataSource.java	7 Mar 2003 00:24:09 -0000	1.6
  +++ TestJdbc2PoolDataSource.java	15 Apr 2003 01:56:28 -0000	1.7
  @@ -170,9 +170,16 @@
           }
       }
   
  -    public void testIncorrectPassword() 
  -        throws Exception 
  +    public void testIncorrectPassword() throws Exception 
       {
  +        try {
  +            // Use bad password
  +            ds.getConnection("u", "zlsafjk").close();
  +        } catch (SQLException e1) {
  +            // should fail
  +        }
  +        
  +        // Use good password
           ds.getConnection("u", "p").close();
           try 
           {
  @@ -187,6 +194,9 @@
               }
               // else the exception was expected
           }
  +        
  +        // Make sure we can still use our good password.
  +        ds.getConnection("u", "p").close();
       }
   
       public void testSimple2() 
  
  
  

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