db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1142626 [3/3] - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/master/ functionTests/suites/ functionTests/tests/store/ junit/
Date Mon, 04 Jul 2011 11:15:34 GMT
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));
 



Mime
View raw message