camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] camel git commit: camel-core: make tests pass on windows
Date Thu, 31 Mar 2016 12:51:05 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 51a7cf2bd -> b29aeeb28
  refs/heads/master 646b40c7f -> d9b9eaf87


camel-core: make tests pass on windows


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d9b9eaf8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d9b9eaf8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d9b9eaf8

Branch: refs/heads/master
Commit: d9b9eaf87dae502a26a9e36c45a56762db0b91e8
Parents: de0dadd
Author: Pascal Schumacher <pascalschumacher@gmx.net>
Authored: Thu Mar 31 14:23:37 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Mar 31 14:47:47 2016 +0200

----------------------------------------------------------------------
 .../apache/camel/component/dataset/FileDataSetProducerTest.java  | 3 +--
 .../component/dataset/FileDataSetProducerWithSplitTest.java      | 3 +--
 .../camel/component/file/FileConsumerExtendedAttributesTest.java | 4 ++++
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d9b9eaf8/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
b/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
index 33f2c9c..70eb028 100644
--- a/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerTest.java
@@ -21,7 +21,6 @@ import javax.naming.Context;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * @version 
@@ -30,7 +29,7 @@ public class FileDataSetProducerTest extends ContextTestSupport {
     protected FileDataSet dataSet;
 
     final String testDataFileName = "src/test/data/file-dataset-test.txt";
-    final String testPayload = "Line 1\nLine 2\nLine 3\nLine 4\nLine 5\nLine 6\nLine 7\nLine
8\nLine 9\nLine 10\n";
+    final String testPayload = String.format("Line 1%nLine 2%nLine 3%nLine 4%nLine 5%nLine
6%nLine 7%nLine 8%nLine 9%nLine 10%n");
 
     final String sourceUri = "direct://source";
     final String dataSetName = "foo";

http://git-wip-us.apache.org/repos/asf/camel/blob/d9b9eaf8/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
b/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
index 7eedffb..1a02b42 100644
--- a/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/dataset/FileDataSetProducerWithSplitTest.java
@@ -21,7 +21,6 @@ import javax.naming.Context;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * @version 
@@ -59,7 +58,7 @@ public class FileDataSetProducerWithSplitTest extends ContextTestSupport
{
 
     @Override
     public void setUp() throws Exception {
-        dataSet = new FileDataSet(testDataFileName, "\n");
+        dataSet = new FileDataSet(testDataFileName, System.lineSeparator());
         assertEquals("Unexpected DataSet size", testDataFileRecordCount, dataSet.getSize());
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d9b9eaf8/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
index d505d9a..5ca4d4b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
@@ -23,6 +23,7 @@ import java.util.Map;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.util.FileUtil;
 import org.junit.Test;
 
 /**
@@ -81,6 +82,9 @@ public class FileConsumerExtendedAttributesTest extends ContextTestSupport
{
 
     @Test
     public void testPosixAttributes() throws Exception {
+        if (FileUtil.isWindows()) {
+            return;
+        }
         testAttributes("mock:posix", "posix:");
     }
 


Mime
View raw message