Index: java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java (revision 377012) +++ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java (working copy) @@ -53,6 +53,9 @@ System.out.println("PASS -- Prepared statement test"); conn.close(); } + + reExecuteStatementTest(); + System.out.println("Test derbyStress finished."); } catch (SQLException se) { TestUtil.dumpSQLExceptions(se); @@ -85,6 +88,9 @@ // user (DERBY-210) private static void prepStmtTest(Connection conn, int numRows, int numPreparedStmts) throws Exception { + // Don't run under DerbyNetClient until DERBY-210 is fixed + if (TestUtil.isDerbyNetClientFramework()) return; + PreparedStatement ps = null; ResultSet rs = null; conn.setAutoCommit(false); @@ -117,4 +123,18 @@ conn.rollback(); } } + + // Tests re-execution of a statement without closing the result + // set (DERBY-557). + private static void reExecuteStatementTest() throws Exception { + System.out.print("DERBY-557: reExecuteStatementTest() "); + Connection conn = ij.startJBMS(); + Statement stmt = conn.createStatement(); + for (int i = 0; i < 50000; i++) { + ResultSet rs = stmt.executeQuery("values(1)"); + // How silly! I forgot to close the result set. + } + stmt.close(); + System.out.println("PASSED"); + } } Index: java/testing/org/apache/derbyTesting/functionTests/master/derbyStress.out =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/master/derbyStress.out (revision 377012) +++ java/testing/org/apache/derbyTesting/functionTests/master/derbyStress.out (working copy) @@ -1,4 +1,5 @@ Test derbyStress starting Testing with 2000 prepared statements PASS -- Prepared statement test +DERBY-557: reExecuteStatementTest() PASSED Test derbyStress finished. \ No newline at end of file Index: java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude (revision 377012) +++ java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude (working copy) @@ -7,7 +7,6 @@ # excluding jdbcapi/checkDataSource30.java - Client behaves differently. Need to look into this # excluding jdbcapi/statementJdbc30.java - Client behaves differently. Need to look into this # excluding jdbcapi/dataSourceReference.java - client side only tests, tests all data sources -# excluding jdbcapi/derbyStress.java - till DERBY-210 is fixed # regardless of framework lang/errorStream.java # lang/scrollCursors2.java @@ -18,4 +17,3 @@ jdbcapi/checkDataSource30.java jdbcapi/statementJdbc30.java jdbcapi/dataSourceReference.java -jdbcapi/derbyStress.java