db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1583343 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerGeneralTest.java
Date Mon, 31 Mar 2014 15:04:38 GMT
Author: dag
Date: Mon Mar 31 15:04:37 2014
New Revision: 1583343

URL: http://svn.apache.org/r1583343
Log:
DERBY-6529 nightly regression test failure in newly added junit test TriggerGeneralTest

Patch to make the test work also on Windows (CR LF issue).

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerGeneralTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerGeneralTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerGeneralTest.java?rev=1583343&r1=1583342&r2=1583343&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerGeneralTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerGeneralTest.java
Mon Mar 31 15:04:37 2014
@@ -2354,12 +2354,19 @@ public final class TriggerGeneralTest ex
         BaseJDBCTestCase.dumpRs(tec.getOldRowSet(), out);
         out.println("\nAFTER RESULT SET");
         BaseJDBCTestCase.dumpRs(tec.getNewRowSet(), out);
-    }
+    }   
 
 
+    /** 
+     * Compare the expected output with the fired triggers' output
+     * and reset the print stream used for this purpose.
+     */
     private static void assertTriggerOutput(String expected) {
-        // reset the print stream and compare.
-        assertEquals(expected, outs.toString());
+        // Windows: get rid of any carriage returns added by println in output 
+        // before we compare since our expected output contains only newlines.
+        String got = outs.toString().replaceAll("\r", "");
+        
+        assertEquals(expected, got);
         outs.reset();
     }
 



Mime
View raw message