db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1567787 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/store/UpdateLocksTest.java junit/JDBC.java
Date Wed, 12 Feb 2014 23:01:35 GMT
Author: myrnavl
Date: Wed Feb 12 23:01:35 2014
New Revision: 1567787

URL: http://svn.apache.org/r1567787
Log:
DERBY-5667; testReadCommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError:
Missing rows in ResultSet
   further improving error message in assert, and avoiding error message re table exists if
a test case fails

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=1567787&r1=1567786&r2=1567787&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
Wed Feb 12 23:01:35 2014
@@ -68,6 +68,8 @@ public class UpdateLocksTest extends Bas
 
         try {
             dropTable("a");
+            // commit to prevent message 'table/view a already exists'
+            commit();
         } catch (SQLException e) {
             assertSQLState("42Y55", e);
         }

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=1567787&r1=1567786&r2=1567787&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 Wed Feb 12 23:01:35
2014
@@ -1462,7 +1462,11 @@ public class JDBC {
         rs.close();
 
         if (rowCountsMustMatch) {
-            Assert.assertEquals("Unexpected row count",
+            String message = "Unexpected row count, expected: " +
+                    expectedRows.length + ", actual: " + actual.size() + "\n" +
+                    "\t expected rows: \n\t\t" + expected + 
+                    "\n\t actual result: \n\t\t" + actual + "\n";
+            Assert.assertEquals(message,
                                 expectedRows.length, actual.size());
         }
         if ( !actual.containsAll(expected) )



Mime
View raw message