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 da...@apache.org on 2011/07/04 13:15:34 UTC

svn commit: r1142626 [3/3] - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/master/ functionTests/suites/ functionTests/tests/store/ junit/

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/UpdateLocksTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java?rev=1142626&r1=1142625&r2=1142626&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/_Suite.java Mon Jul  4 11:15:34 2011
@@ -60,6 +60,7 @@ public class _Suite extends BaseTestCase
         suite.addTest(InterruptResilienceTest.suite());
         suite.addTest(Derby4676Test.suite());
         suite.addTest(BootLockTest.suite());
+        suite.addTest(UpdateLocksTest.suite());
         suite.addTest(PositionedStoreStreamTest.suite());
         suite.addTest(OSReadOnlyTest.suite());
         suite.addTest(BackupRestoreTest.suite());

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=1142626&r1=1142625&r2=1142626&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 Jul  4 11:15:34 2011
@@ -1316,28 +1316,27 @@ public class JDBC {
         for (int i = 0; i < expectedRows.length; i++) {
             Assert.assertEquals("Different column count in expectedRows",
                                 expectedRows[0].length, expectedRows[i].length);
-            if (asTrimmedStrings) {
-                ArrayList row = new ArrayList(expectedRows[i].length);
-                for (int j = 0; j < expectedRows[i].length; j++) {
-                    String val = (String) expectedRows[i][j];
-                    row.add(val == null ? null : val.trim());
-                }
-                expected.add(row);
-            } else {
-                expected.add(Arrays.asList(expectedRows[i]));
+            ArrayList row = new ArrayList(expectedRows[i].length);
+
+            for (int j = 0; j < expectedRows[i].length; j++) {
+                String val = (String) expectedRows[i][j];
+                row.add(asTrimmedStrings ?
+                        (val == null ? null : val.trim()) :
+                        val);
             }
+            expected.add(row);
         }
 
         ArrayList actual = new ArrayList(expectedRows.length);
         while (rs.next()) {
             ArrayList row = new ArrayList(expectedRows[0].length);
             for (int i = 1; i <= expectedRows[0].length; i++) {
-                if (asTrimmedStrings) {
-                    String s = rs.getString(i);
-                    row.add(s == null ? null : s.trim());
-                } else {
-                    row.add(rs.getObject(i));
-                }
+                String s = rs.getString(i);
+
+                row.add(asTrimmedStrings ?
+                        (s == null ? null : s.trim()) :
+                        s);
+
                 if (rs.wasNull())
                     assertResultColumnNullable(rsmd, i);
             }
@@ -1347,7 +1346,6 @@ public class JDBC {
 
         Assert.assertEquals("Unexpected row count",
                             expectedRows.length, actual.size());
-
         Assert.assertTrue("Missing rows in ResultSet",
                           actual.containsAll(expected));