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 my...@apache.org on 2012/08/09 22:22:52 UTC

svn commit: r1371433 - in /db/derby/code/branches/10.8: ./ java/client/org/apache/derby/client/net/NetCursor.java java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java java/testing/org/apache/derbyTesting/junit/JDBC.java

Author: myrnavl
Date: Thu Aug  9 20:22:52 2012
New Revision: 1371433

URL: http://svn.apache.org/viewvc?rev=1371433&view=rev
Log:
DERBY-5667; testReadCommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError: Missing rows in ResultSet
  backport of change of revision 1370647 from 10.9

Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/client/org/apache/derby/client/net/NetCursor.java   (props changed)
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/JDBC.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/branches/10.9:r1370647

Propchange: db/derby/code/branches/10.8/java/client/org/apache/derby/client/net/NetCursor.java
------------------------------------------------------------------------------
  Merged /db/derby/code/branches/10.9/java/client/org/apache/derby/client/net/NetCursor.java:r1370647

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java?rev=1371433&r1=1371432&r2=1371433&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java (original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java Thu Aug  9 20:22:52 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/branches/10.8/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/JDBC.java?rev=1371433&r1=1371432&r2=1371433&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/junit/JDBC.java Thu Aug  9 20:22:52 2012
@@ -1346,7 +1346,9 @@ public class JDBC {
 
         Assert.assertEquals("Unexpected row count",
                             expectedRows.length, actual.size());
-        Assert.assertTrue("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.assertTrue(message,
                           actual.containsAll(expected));
 
         actual.removeAll(expected);