db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1370647 - in /db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting: functionTests/tests/store/UpdateLocksTest.java junit/JDBC.java
Date Wed, 08 Aug 2012 02:50:12 GMT
Author: myrnavl
Date: Wed Aug  8 02:50:12 2012
New Revision: 1370647

URL: http://svn.apache.org/viewvc?rev=1370647&view=rev
Log:
DERBY-5667; testReadCommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError:
Missing rows in ResultSet
  backport of revision 1370058 from trunk - UpdateLocksTest without trouble, but
  JDBC.java has the changes in method assertUnorderedResultSet.

Modified:
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/JDBC.java

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java?rev=1370647&r1=1370646&r2=1370647&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java
(original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java
Wed Aug  8 02:50:12 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.9/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/JDBC.java?rev=1370647&r1=1370646&r2=1370647&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/JDBC.java Wed Aug
 8 02:50:12 2012
@@ -1348,7 +1348,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);



Mime
View raw message