You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2003/12/22 15:58:39 UTC
cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp TestConnectionPool.java
dirkv 2003/12/22 06:58:39
Modified: dbcp/src/test/org/apache/commons/dbcp
TestConnectionPool.java
Log:
Testcase for:
Bugzilla Bug 24966: NullPointer with Oracle 9 driver
wrong order of passivate/close when a rset isn't closed
Revision Changes Path
1.11 +18 -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.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TestConnectionPool.java 2 Nov 2003 17:55:42 -0000 1.10
+++ TestConnectionPool.java 22 Dec 2003 14:58:39 -0000 1.11
@@ -507,5 +507,19 @@
rset.close();
stmt.close();
conn.close();
- }
+ }
+
+ // Bugzilla Bug 24966: NullPointer with Oracle 9 driver
+ // wrong order of passivate/close when a rset isn't closed
+ public void testNoRsetClose() throws Exception {
+ Connection conn = getConnection();
+ assertNotNull(conn);
+ PreparedStatement stmt = conn.prepareStatement("test");
+ assertNotNull(stmt);
+ ResultSet rset = stmt.getResultSet();
+ assertNotNull(rset);
+ // forget to close the resultset: 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