Index: ConnectionPoolTest.java =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/test/jdbc2/optional/ConnectionPoolTest.java,v retrieving revision 1.3 diff -c -r1.3 ConnectionPoolTest.java *** ConnectionPoolTest.java 2002/09/11 05:38:45 1.3 --- ConnectionPoolTest.java 2002/12/11 01:56:45 *************** *** 341,347 **** } } ! /** * Helper class to remove a listener during event dispatching. */ private class RemoveClose implements ConnectionEventListener --- 341,403 ---- } } ! /** ! * Ensures that a statement generated by a proxied connection returns the ! * proxied connection from getConnection() [not the physical connection]. ! */ ! public void testStatementConnection() { ! try { ! PooledConnection pc = getPooledConnection(); ! Connection con = pc.getConnection(); ! Statement s = con.createStatement(); ! Connection conRetrieved = s.getConnection(); ! ! assertTrue(con.getClass().equals(conRetrieved.getClass())); ! assertTrue(con.equals(conRetrieved)); ! } catch (SQLException e) { ! fail(e.getMessage()); ! } ! } ! ! /** ! * Ensures that a prepared statement generated by a proxied connection ! * returns the proxied connection from getConnection() [not the physical ! * connection]. ! */ ! public void testPreparedStatementConnection() { ! try { ! PooledConnection pc = getPooledConnection(); ! Connection con = pc.getConnection(); ! PreparedStatement s = con.prepareStatement("select 'x'"); ! Connection conRetrieved = s.getConnection(); ! ! assertTrue(con.getClass().equals(conRetrieved.getClass())); ! assertTrue(con.equals(conRetrieved)); ! } catch (SQLException e) { ! fail(e.getMessage()); ! } ! } ! ! /** ! * Ensures that a callable statement generated by a proxied connection ! * returns the proxied connection from getConnection() [not the physical ! * connection]. ! */ ! public void testCallableStatementConnection() { ! try { ! PooledConnection pc = getPooledConnection(); ! Connection con = pc.getConnection(); ! CallableStatement s = con.prepareCall("select 'x'"); ! Connection conRetrieved = s.getConnection(); ! ! assertTrue(con.getClass().equals(conRetrieved.getClass())); ! assertTrue(con.equals(conRetrieved)); ! } catch (SQLException e) { ! fail(e.getMessage()); ! } ! } ! ! /** * Helper class to remove a listener during event dispatching. */ private class RemoveClose implements ConnectionEventListener