You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2007/03/30 02:02:52 UTC

svn commit: r523887 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java

Author: rhillegas
Date: Thu Mar 29 17:02:51 2007
New Revision: 523887

URL: http://svn.apache.org/viewvc?view=rev&rev=523887
Log:
DERBY-2502: Commit patch which closes result sets in the JUnit tests.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java?view=diff&rev=523887&r1=523886&r2=523887
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java Thu Mar 29 17:02:51 2007
@@ -593,6 +593,7 @@
      * column equal to the passed in String value. The value can
      * be null to indicate SQL NULL. The comparision is make
      * using assertFullResultSet in trimmed string mode.
+     *  As a side effect, this method closes the ResultSet.
      */
     public static void assertSingleValueResultSet(ResultSet rs,
             String value) throws SQLException
@@ -608,6 +609,7 @@
      * <code>
      * assertFullResultSet(rs, expectedRows, true)
      * </code>
+     *  As a side effect, this method closes the ResultSet.
      */
     public static void assertFullResultSet(ResultSet rs,
             String [][] expectedRows)
@@ -621,7 +623,7 @@
      * that the rows and columns in the result set match the number,
      * order, and values of those in the array.  Each row in
      * the array is compared with the corresponding row in the
-     * result set.
+     * result set. As a side effect, this method closes the ResultSet.
      *
      * Will throw an assertion failure if any of the following
      * is true:
@@ -674,6 +676,8 @@
                     expectedRows[rows], allAsTrimmedStrings);
             }
         }
+
+        rs.close();
 
         // And finally, assert the row count.
         Assert.assertEquals("Unexpected row count:", expectedRows.length, rows);