db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
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 GMT
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 );
         }
     }
 



Mime
View raw message