Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 41560 invoked from network); 18 Jan 2008 21:16:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jan 2008 21:16:20 -0000 Received: (qmail 97733 invoked by uid 500); 18 Jan 2008 21:16:09 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 97660 invoked by uid 500); 18 Jan 2008 21:16:09 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 97649 invoked by uid 99); 18 Jan 2008 21:16:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2008 13:16:09 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2008 21:16:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4BE9B1A9832; Fri, 18 Jan 2008 13:15:56 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r613275 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java Date: Fri, 18 Jan 2008 21:15:56 -0000 To: derby-commits@db.apache.org From: kmarsden@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080118211556.4BE9B1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kmarsden Date: Fri Jan 18 13:15:55 2008 New Revision: 613275 URL: http://svn.apache.org/viewvc?rev=613275&view=rev Log: DERBY-3323 ComparisonFailure in derbyStress The test intentionally does not close ResultSets to test for a leak, but this was causing an error dropping the table. Changed the test to close the last ResultSet and gc() to avoid the drop table error. Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java?rev=613275&r1=613274&r2=613275&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/derbyStress.java Fri Jan 18 13:15:55 2008 @@ -150,10 +150,11 @@ ps.setString(1,"hello"); ps.executeUpdate(); ps.close(); + ResultSet rs = null; for (int i = 0; i < 2000; i++) { s = conn.createStatement(); - ResultSet rs = s.executeQuery("SELECT * from tab"); + rs = s.executeQuery("SELECT * from tab"); // drain the resultset while (rs.next()); // With DERBY-3316, If I don't explicitly close the resultset or @@ -161,6 +162,11 @@ //rs.close(); //s.close(); } + // close the final ResultSet and gc() so we won't have a + // ResultSet reference when we try to drop the table. + rs.close(); + rs = null; + System.gc(); s = conn.createStatement(); s.executeUpdate("DROP TABLE TAB"); s.close();