camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1148762 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/component/file/strategy/ components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/
Date Wed, 20 Jul 2011 13:36:04 GMT
Author: davsclaus
Date: Wed Jul 20 13:36:03 2011
New Revision: 1148762

URL: http://svn.apache.org/viewvc?rev=1148762&view=rev
Log:
Fixed ftp tests fails on windows. Made test more resilient on what os it runs due line terminators
diffs

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java?rev=1148762&r1=1148761&r2=1148762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
Wed Jul 20 13:36:03 2011
@@ -48,7 +48,8 @@ public class FileChangedReadLockTest ext
         String[] lines = content.split("\n");
         assertEquals("There should be 20 lines in the file", 20, lines.length);
         for (int i = 0; i < 20; i++) {
-            assertEquals("Line " + i, lines[i]);
+            // there may be windows line terminators
+            assertTrue(lines[i].startsWith("Line " + i));
         }
     }
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java?rev=1148762&r1=1148761&r2=1148762&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
Wed Jul 20 13:36:03 2011
@@ -59,7 +59,8 @@ public class MarkerFileExclusiveReadLock
         content = context.getTypeConverter().convertTo(String.class, new File("target/marker/out/file2.dat").getAbsoluteFile());
         lines = content.split("\n");
         for (int i = 0; i < 20; i++) {
-            assertEquals("Line " + i, lines[i]);
+            // there may be windows line terminators
+            assertTrue(lines[i].startsWith("Line " + i));
         }
 
         waitUntilCompleted();

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java?rev=1148762&r1=1148761&r2=1148762&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java
Wed Jul 20 13:36:03 2011
@@ -50,7 +50,8 @@ public class FtpChangedReadLockTest exte
         String[] lines = content.split("\n");
         assertEquals("There should be 20 lines in the file", 20, lines.length);
         for (int i = 0; i < 20; i++) {
-            assertEquals("Line " + i, lines[i]);
+            // there may be windows line terminators
+            assertTrue(lines[i].startsWith("Line " + i));
         }
     }
 



Mime
View raw message