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 TestConnectionPool.java
Date Sun, 02 Nov 2003 17:55:42 GMT
dirkv       2003/11/02 09:55:42

  Modified:    dbcp/src/test/org/apache/commons/dbcp
                        TestConnectionPool.java
  Log:
  testcase for: Bugzilla Bug 24328: PooledConnectionImpl ignores resultsetType
  and Concurrency if statement pooling is not enabled
  http://issues.apache.org/bugzilla/show_bug.cgi?id=24328
  
  Revision  Changes    Path
  1.10      +25 -4     jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestConnectionPool.java
  
  Index: TestConnectionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestConnectionPool.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestConnectionPool.java	15 Oct 2003 19:52:13 -0000	1.9
  +++ TestConnectionPool.java	2 Nov 2003 17:55:42 -0000	1.10
  @@ -486,5 +486,26 @@
               _complete = true;
           }
       }
  -    
  +
  +    // Bugzilla Bug 24328: PooledConnectionImpl ignores resultsetType 
  +    // and Concurrency if statement pooling is not enabled
  +    // http://issues.apache.org/bugzilla/show_bug.cgi?id=24328
  +    public void testPrepareStatementOptions() throws Exception 
  +    {
  +        Connection conn = getConnection();
  +        assertTrue(null != conn);
  +        PreparedStatement stmt = conn.prepareStatement("select * from dual", 
  +            ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
  +        assertTrue(null != stmt);
  +        ResultSet rset = stmt.executeQuery();
  +        assertTrue(null != rset);
  +        assertTrue(rset.next());
  +        
  +        assertEquals(ResultSet.TYPE_SCROLL_SENSITIVE, rset.getType());
  +        assertEquals(ResultSet.CONCUR_UPDATABLE, rset.getConcurrency());
  +        
  +        rset.close();
  +        stmt.close();
  +        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