From derby-commits-return-15896-apmail-db-derby-commits-archive=db.apache.org@db.apache.org Mon Aug 6 23:21:16 2012 Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E91C6D14E for ; Mon, 6 Aug 2012 23:21:16 +0000 (UTC) Received: (qmail 44621 invoked by uid 500); 6 Aug 2012 23:21:16 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 44597 invoked by uid 500); 6 Aug 2012 23:21:16 -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 44584 invoked by uid 99); 6 Aug 2012 23:21:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2012 23:21:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2012 23:21:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CEB4223888FD; Mon, 6 Aug 2012 23:20:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1370058 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/store/UpdateLocksTest.java junit/JDBC.java Date: Mon, 06 Aug 2012 23:20:29 -0000 To: derby-commits@db.apache.org From: myrnavl@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120806232029.CEB4223888FD@eris.apache.org> Author: myrnavl Date: Mon Aug 6 23:20:29 2012 New Revision: 1370058 URL: http://svn.apache.org/viewvc?rev=1370058&view=rev Log: DERBY-5667; testReadCommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError: Missing rows in ResultSet Adding wait_for_post_commit calls after commits following updates; changing JDBC.assertRSContains() to print out more details if there are missing rows. Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java?rev=1370058&r1=1370057&r2=1370058&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java Mon Aug 6 23:20:29 2012 @@ -2490,6 +2490,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _t, "2", _IX, _A, _tl, _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -2526,6 +2528,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _t, "2", _IX, _A, _tl, _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -2672,6 +2676,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _t, "2", _IX, _A, _tl, _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -2753,6 +2759,8 @@ public class UpdateLocksTest extends Bas ) )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -2779,6 +2787,8 @@ public class UpdateLocksTest extends Bas "update a set b = 4000 where a < 0"); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -2891,6 +2901,8 @@ public class UpdateLocksTest extends Bas ) )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -6975,6 +6987,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _r, "3", _X, _A, "(3,6)", _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -7048,6 +7062,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _r, "3", _X, _A, "(3,6)", _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -7133,6 +7149,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _r, "3", _X, _A, "(5,6)", _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); @@ -7251,6 +7269,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _r, "1", _X, _A, "(2,6)", _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); JDBC.assertUnorderedResultSet( @@ -7493,6 +7513,8 @@ public class UpdateLocksTest extends Bas {_app, _ut, _r, "3", _X, _A, "(3,6)", _g, _a}} )); c.commit(); + // wait for post-commit tasks before going on + s.execute("call wait_for_post_commit()"); ltrs = getLocks(); JDBC.assertEmpty(ltrs); c.commit(); 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?rev=1370058&r1=1370057&r2=1370058&view=diff ============================================================================== --- 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 Mon Aug 6 23:20:29 2012 @@ -1392,7 +1392,9 @@ public class JDBC { expected.removeAll( actual ); BaseTestCase.println ( "These expected rows don't appear in the actual result: " + expected ); - Assert.fail( "Missing rows in ResultSet" ); + String message = "Missing rows in ResultSet; \n\t expected rows: \n\t\t" + + expected + "\n\t actual result: \n\t\t" + actual; + Assert.fail( message ); } }