You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/10/07 09:16:54 UTC
[1/8] git commit: Fixed test on CI servers
Updated Branches:
refs/heads/camel-2.12.x 568f0df38 -> 45222fdd6
refs/heads/master 05fc17f5c -> d7653ff3a
Fixed test on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/15244520
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/15244520
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/15244520
Branch: refs/heads/master
Commit: 15244520e0edf1b2d19247d17fa950f35abfbc47
Parents: 05fc17f
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 08:55:20 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 08:55:20 2013 +0200
----------------------------------------------------------------------
.../camel/component/vm/VmMultipleConsumersRemoteRouteTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/15244520/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java b/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
index 4c5a656..f69402e 100644
--- a/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.vm;
+import java.util.concurrent.TimeUnit;
+
import junit.framework.TestCase;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
@@ -61,7 +63,7 @@ public class VmMultipleConsumersRemoteRouteTest extends TestCase {
producerTemplate.sendBody("vm:producer?multipleConsumers=true", i);
}
- MockEndpoint.assertIsSatisfied(mock1, mock2);
+ MockEndpoint.assertIsSatisfied(20, TimeUnit.SECONDS, mock1, mock2);
camelContext.stop();
}
[2/8] git commit: Fixed test on CI servers
Posted by da...@apache.org.
Fixed test on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f33e3fb7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f33e3fb7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f33e3fb7
Branch: refs/heads/master
Commit: f33e3fb7e7d365417dc6567e67292afd7c58239a
Parents: 1524452
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 08:59:45 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 08:59:45 2013 +0200
----------------------------------------------------------------------
.../java/org/apache/camel/converter/jaxp/StaxConverterTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f33e3fb7/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java b/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
index eba7b59..5fe411b 100644
--- a/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
@@ -75,8 +75,8 @@ public class StaxConverterTest extends ContextTestSupport {
String result = new String(output.toByteArray(), UTF_8.name());
- assertEquals(TEST_XML_WITH_XML_HEADER, result);
-
+ boolean equals = TEST_XML_WITH_XML_HEADER.equals(result) || TEST_XML_WITH_XML_HEADER_ISO_8859_1.equals(result);
+ assertTrue("Should match header", equals);
}
public void testEncodingXmlStreamReader() throws Exception {
[4/8] git commit: Fixed test on CI servers
Posted by da...@apache.org.
Fixed test on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d7653ff3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d7653ff3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d7653ff3
Branch: refs/heads/master
Commit: d7653ff3ac56622b40ee6990b0ad349a140dfd1e
Parents: 90073a2
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 09:15:56 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 09:15:56 2013 +0200
----------------------------------------------------------------------
.../component/jsch/ScpServerTestSupport.java | 6 +--
.../component/jsch/ScpSimpleProduceTest.java | 55 +++++++++-----------
2 files changed, 29 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d7653ff3/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
index f31dfa7..c207742 100644
--- a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
+++ b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
@@ -86,8 +86,8 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
@Override
@Before
public void setUp() throws Exception {
- File root = new File(getScpPath());
- root.mkdirs(); // implicitly create sshd home dir
+ deleteDirectory(getScpPath());
+ createDirectory(getScpPath());
setupComplete = startSshd();
setupKnownHosts();
@@ -109,6 +109,7 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
}
}
FileUtil.deleteFile(new File(knownHostsFile));
+ deleteDirectory(getScpPath());
}
protected final String getScpPath() {
@@ -121,7 +122,6 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
return "scp://localhost:" + getPort() + "/" + getScpPath();
}
-
@SuppressWarnings("unchecked")
protected boolean startSshd() {
sshd = SshServer.setUpDefaultServer();
http://git-wip-us.apache.org/repos/asf/camel/blob/d7653ff3/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
index 524ca8e..27c58e5 100644
--- a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
+++ b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
@@ -16,72 +16,72 @@
*/
package org.apache.camel.component.jsch;
-import java.io.File;
-
import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;
public class ScpSimpleProduceTest extends ScpServerTestSupport {
-
+
@Override
- public boolean isUseRouteBuilder() {
- return false;
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("file:" + getScpPath() + "?recursive=true&delete=true")
+ .convertBodyTo(String.class)
+ .to("mock:result");
+ }
+ };
}
@Test
public void testScpSimpleProduce() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
String uri = getScpUri() + "?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Hello World", Exchange.FILE_NAME, "hello.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/hello.txt");
- assertFileExists(file.getAbsolutePath());
- assertEquals("Hello World", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
public void testScpSimpleSubPathProduce() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
String uri = getScpUri() + "?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Bye World", Exchange.FILE_NAME, "mysub/bye.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/mysub/bye.txt");
- assertFileExists(file.getAbsolutePath());
- assertEquals("Bye World", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
public void testScpSimpleTwoSubPathProduce() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Farewell World");
+
String uri = getScpUri() + "?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Farewell World", Exchange.FILE_NAME, "mysub/mysubsub/farewell.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/mysub/mysubsub/farewell.txt");
- assertFileExists(file.getAbsolutePath());
- assertEquals("Farewell World", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
public void testScpProduceChmod() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Bonjour Monde");
+
String uri = getScpUri() + "?username=admin&password=admin&chmod=640&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Bonjour Monde", Exchange.FILE_NAME, "monde.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/monde.txt");
- assertFileExists(file.getAbsolutePath());
- // Mina sshd we use for testing ignores file perms;
- // assertFalse("File should not have execute rights: " + file, file.canExecute());
- assertEquals("Bonjour Monde", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
@@ -89,14 +89,11 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport {
public void testScpProducePrivateKey() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedMessageCount(1);
+
String uri = getScpUri() + "?username=admin&privateKeyFile=src/test/resources/camel-key.priv&privateKeyFilePassphrase=password&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Hallo Welt", Exchange.FILE_NAME, "welt.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/welt.txt");
- assertFileExists(file.getAbsolutePath());
- // Mina sshd we use for testing ignores file perms;
- // assertFalse("File should not have execute rights: " + file, file.canExecute());
- assertEquals("Hallo Welt", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
}
[3/8] git commit: Fixed tests on CI servers
Posted by da...@apache.org.
Fixed tests on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/90073a2e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/90073a2e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/90073a2e
Branch: refs/heads/master
Commit: 90073a2ebc8ee3780a33542658e8b9a3f5d824c6
Parents: f33e3fb
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 09:05:43 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 09:05:43 2013 +0200
----------------------------------------------------------------------
.../camel/component/file/FileProducerExpressionTest.java | 6 ++++--
.../camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java | 4 +++-
.../camel/component/vm/SameVmQueueSizeAndNoSizeTest.java | 4 +++-
.../ManagedRouteStopWithAbortAfterTimeoutTest.java | 8 ++++----
.../camel/processor/SplitterWithScannerIoExceptionTest.java | 2 +-
5 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/90073a2e/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
index 0eb15be..1ab9f6f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
@@ -45,8 +45,10 @@ public class FileProducerExpressionTest extends ContextTestSupport {
}
public void testProducerFileNameHeaderNotEvaluated() {
- template.sendBodyAndHeader("file://target/filelanguage", "Hello World", Exchange.FILE_NAME, "$simple{myfile-${date:now:yyyyMMdd}}.txt");
- assertFileExists("target/filelanguage/$simple{myfile-${date:now:yyyyMMdd}}.txt");
+ if (!isPlatform("windows")) {
+ template.sendBodyAndHeader("file://target/filelanguage", "Hello World", Exchange.FILE_NAME, "$simple{myfile-${date:now:yyyyMMdd}}.txt");
+ assertFileExists("target/filelanguage/$simple{myfile-${date:now:yyyyMMdd}}.txt");
+ }
}
public void testProduceBeanByExpression() throws Exception {
http://git-wip-us.apache.org/repos/asf/camel/blob/90073a2e/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java b/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
index 03b94b0..7aa0d81 100644
--- a/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
@@ -36,7 +36,9 @@ public class SameSedaQueueSizeAndNoSizeTest extends ContextTestSupport {
fail("Should fail");
} catch (CamelExecutionException e) {
IllegalStateException ise = assertIsInstanceOf(IllegalStateException.class, e.getCause());
- assertEquals("Queue full", ise.getMessage());
+ if (!isJavaVendor("ibm")) {
+ assertEquals("Queue full", ise.getMessage());
+ }
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/90073a2e/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java b/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
index 25ca288..b2c2d01 100644
--- a/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
@@ -36,7 +36,9 @@ public class SameVmQueueSizeAndNoSizeTest extends ContextTestSupport {
fail("Should fail");
} catch (CamelExecutionException e) {
IllegalStateException ise = assertIsInstanceOf(IllegalStateException.class, e.getCause());
- assertEquals("Queue full", ise.getMessage());
+ if (!isJavaVendor("ibm")) {
+ assertEquals("Queue full", ise.getMessage());
+ }
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/90073a2e/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
index 41857ed..87de272 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
@@ -31,8 +31,8 @@ import org.apache.camel.component.mock.MockEndpoint;
public class ManagedRouteStopWithAbortAfterTimeoutTest extends ManagementTestSupport {
public void testStopRouteWithAbortAfterTimeoutTrue() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- if (isPlatform("aix")) {
+ // JMX tests dont work well on AIX or windows CI servers (hangs them)
+ if (isPlatform("aix") || isPlatform("windows")) {
return;
}
@@ -72,8 +72,8 @@ public class ManagedRouteStopWithAbortAfterTimeoutTest extends ManagementTestSup
}
public void testStopRouteWithAbortAfterTimeoutFalse() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- if (isPlatform("aix")) {
+ // JMX tests dont work well on AIX or windows CI servers (hangs them)
+ if (isPlatform("aix") || isPlatform("windows")) {
return;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/90073a2e/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java b/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
index a4e1d00..92eaf27 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
@@ -22,7 +22,7 @@ import org.apache.camel.builder.RouteBuilder;
public class SplitterWithScannerIoExceptionTest extends ContextTestSupport {
public void testSplitterStreamingWithError() throws Exception {
- if (isJavaVersion("1.7")) {
+ if (isJavaVersion("1.7") || isPlatform("aix") || isJavaVendor("ibm")) {
return;
}
[5/8] git commit: Fixed test on CI servers
Posted by da...@apache.org.
Fixed test on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d9d3b41a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d9d3b41a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d9d3b41a
Branch: refs/heads/camel-2.12.x
Commit: d9d3b41a78cf954d8fc22a3641c8c7c3fd0db516
Parents: 568f0df
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 08:55:20 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 09:16:18 2013 +0200
----------------------------------------------------------------------
.../camel/component/vm/VmMultipleConsumersRemoteRouteTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d9d3b41a/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java b/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
index 4c5a656..f69402e 100644
--- a/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/vm/VmMultipleConsumersRemoteRouteTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.vm;
+import java.util.concurrent.TimeUnit;
+
import junit.framework.TestCase;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
@@ -61,7 +63,7 @@ public class VmMultipleConsumersRemoteRouteTest extends TestCase {
producerTemplate.sendBody("vm:producer?multipleConsumers=true", i);
}
- MockEndpoint.assertIsSatisfied(mock1, mock2);
+ MockEndpoint.assertIsSatisfied(20, TimeUnit.SECONDS, mock1, mock2);
camelContext.stop();
}
[7/8] git commit: Fixed tests on CI servers
Posted by da...@apache.org.
Fixed tests on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2e7aafdb
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2e7aafdb
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2e7aafdb
Branch: refs/heads/camel-2.12.x
Commit: 2e7aafdbaf44eb2bcbfbba718ee7b6f1e9a13ff8
Parents: a355e68
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 09:05:43 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 09:16:30 2013 +0200
----------------------------------------------------------------------
.../camel/component/file/FileProducerExpressionTest.java | 6 ++++--
.../camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java | 4 +++-
.../camel/component/vm/SameVmQueueSizeAndNoSizeTest.java | 4 +++-
.../ManagedRouteStopWithAbortAfterTimeoutTest.java | 8 ++++----
.../camel/processor/SplitterWithScannerIoExceptionTest.java | 2 +-
5 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2e7aafdb/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
index 0eb15be..1ab9f6f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
@@ -45,8 +45,10 @@ public class FileProducerExpressionTest extends ContextTestSupport {
}
public void testProducerFileNameHeaderNotEvaluated() {
- template.sendBodyAndHeader("file://target/filelanguage", "Hello World", Exchange.FILE_NAME, "$simple{myfile-${date:now:yyyyMMdd}}.txt");
- assertFileExists("target/filelanguage/$simple{myfile-${date:now:yyyyMMdd}}.txt");
+ if (!isPlatform("windows")) {
+ template.sendBodyAndHeader("file://target/filelanguage", "Hello World", Exchange.FILE_NAME, "$simple{myfile-${date:now:yyyyMMdd}}.txt");
+ assertFileExists("target/filelanguage/$simple{myfile-${date:now:yyyyMMdd}}.txt");
+ }
}
public void testProduceBeanByExpression() throws Exception {
http://git-wip-us.apache.org/repos/asf/camel/blob/2e7aafdb/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java b/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
index 03b94b0..7aa0d81 100644
--- a/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/seda/SameSedaQueueSizeAndNoSizeTest.java
@@ -36,7 +36,9 @@ public class SameSedaQueueSizeAndNoSizeTest extends ContextTestSupport {
fail("Should fail");
} catch (CamelExecutionException e) {
IllegalStateException ise = assertIsInstanceOf(IllegalStateException.class, e.getCause());
- assertEquals("Queue full", ise.getMessage());
+ if (!isJavaVendor("ibm")) {
+ assertEquals("Queue full", ise.getMessage());
+ }
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/2e7aafdb/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java b/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
index 25ca288..b2c2d01 100644
--- a/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/vm/SameVmQueueSizeAndNoSizeTest.java
@@ -36,7 +36,9 @@ public class SameVmQueueSizeAndNoSizeTest extends ContextTestSupport {
fail("Should fail");
} catch (CamelExecutionException e) {
IllegalStateException ise = assertIsInstanceOf(IllegalStateException.class, e.getCause());
- assertEquals("Queue full", ise.getMessage());
+ if (!isJavaVendor("ibm")) {
+ assertEquals("Queue full", ise.getMessage());
+ }
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/2e7aafdb/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
index 41857ed..87de272 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
@@ -31,8 +31,8 @@ import org.apache.camel.component.mock.MockEndpoint;
public class ManagedRouteStopWithAbortAfterTimeoutTest extends ManagementTestSupport {
public void testStopRouteWithAbortAfterTimeoutTrue() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- if (isPlatform("aix")) {
+ // JMX tests dont work well on AIX or windows CI servers (hangs them)
+ if (isPlatform("aix") || isPlatform("windows")) {
return;
}
@@ -72,8 +72,8 @@ public class ManagedRouteStopWithAbortAfterTimeoutTest extends ManagementTestSup
}
public void testStopRouteWithAbortAfterTimeoutFalse() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- if (isPlatform("aix")) {
+ // JMX tests dont work well on AIX or windows CI servers (hangs them)
+ if (isPlatform("aix") || isPlatform("windows")) {
return;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/2e7aafdb/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java b/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
index a4e1d00..92eaf27 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
@@ -22,7 +22,7 @@ import org.apache.camel.builder.RouteBuilder;
public class SplitterWithScannerIoExceptionTest extends ContextTestSupport {
public void testSplitterStreamingWithError() throws Exception {
- if (isJavaVersion("1.7")) {
+ if (isJavaVersion("1.7") || isPlatform("aix") || isJavaVendor("ibm")) {
return;
}
[6/8] git commit: Fixed test on CI servers
Posted by da...@apache.org.
Fixed test on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a355e68d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a355e68d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a355e68d
Branch: refs/heads/camel-2.12.x
Commit: a355e68d95fe48b6714a3f9395693d5cea6fed75
Parents: d9d3b41
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 08:59:45 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 09:16:24 2013 +0200
----------------------------------------------------------------------
.../java/org/apache/camel/converter/jaxp/StaxConverterTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/a355e68d/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java b/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
index eba7b59..5fe411b 100644
--- a/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/converter/jaxp/StaxConverterTest.java
@@ -75,8 +75,8 @@ public class StaxConverterTest extends ContextTestSupport {
String result = new String(output.toByteArray(), UTF_8.name());
- assertEquals(TEST_XML_WITH_XML_HEADER, result);
-
+ boolean equals = TEST_XML_WITH_XML_HEADER.equals(result) || TEST_XML_WITH_XML_HEADER_ISO_8859_1.equals(result);
+ assertTrue("Should match header", equals);
}
public void testEncodingXmlStreamReader() throws Exception {
[8/8] git commit: Fixed test on CI servers
Posted by da...@apache.org.
Fixed test on CI servers
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/45222fdd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/45222fdd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/45222fdd
Branch: refs/heads/camel-2.12.x
Commit: 45222fdd603fd96b7884b8457aec9453f8fee52e
Parents: 2e7aafd
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 7 09:15:56 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 7 09:16:36 2013 +0200
----------------------------------------------------------------------
.../component/jsch/ScpServerTestSupport.java | 6 +--
.../component/jsch/ScpSimpleProduceTest.java | 55 +++++++++-----------
2 files changed, 29 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/45222fdd/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
index f31dfa7..c207742 100644
--- a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
+++ b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
@@ -86,8 +86,8 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
@Override
@Before
public void setUp() throws Exception {
- File root = new File(getScpPath());
- root.mkdirs(); // implicitly create sshd home dir
+ deleteDirectory(getScpPath());
+ createDirectory(getScpPath());
setupComplete = startSshd();
setupKnownHosts();
@@ -109,6 +109,7 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
}
}
FileUtil.deleteFile(new File(knownHostsFile));
+ deleteDirectory(getScpPath());
}
protected final String getScpPath() {
@@ -121,7 +122,6 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
return "scp://localhost:" + getPort() + "/" + getScpPath();
}
-
@SuppressWarnings("unchecked")
protected boolean startSshd() {
sshd = SshServer.setUpDefaultServer();
http://git-wip-us.apache.org/repos/asf/camel/blob/45222fdd/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
index 524ca8e..27c58e5 100644
--- a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
+++ b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
@@ -16,72 +16,72 @@
*/
package org.apache.camel.component.jsch;
-import java.io.File;
-
import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;
public class ScpSimpleProduceTest extends ScpServerTestSupport {
-
+
@Override
- public boolean isUseRouteBuilder() {
- return false;
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("file:" + getScpPath() + "?recursive=true&delete=true")
+ .convertBodyTo(String.class)
+ .to("mock:result");
+ }
+ };
}
@Test
public void testScpSimpleProduce() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
String uri = getScpUri() + "?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Hello World", Exchange.FILE_NAME, "hello.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/hello.txt");
- assertFileExists(file.getAbsolutePath());
- assertEquals("Hello World", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
public void testScpSimpleSubPathProduce() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
String uri = getScpUri() + "?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Bye World", Exchange.FILE_NAME, "mysub/bye.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/mysub/bye.txt");
- assertFileExists(file.getAbsolutePath());
- assertEquals("Bye World", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
public void testScpSimpleTwoSubPathProduce() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Farewell World");
+
String uri = getScpUri() + "?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Farewell World", Exchange.FILE_NAME, "mysub/mysubsub/farewell.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/mysub/mysubsub/farewell.txt");
- assertFileExists(file.getAbsolutePath());
- assertEquals("Farewell World", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
public void testScpProduceChmod() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedBodiesReceived("Bonjour Monde");
+
String uri = getScpUri() + "?username=admin&password=admin&chmod=640&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Bonjour Monde", Exchange.FILE_NAME, "monde.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/monde.txt");
- assertFileExists(file.getAbsolutePath());
- // Mina sshd we use for testing ignores file perms;
- // assertFalse("File should not have execute rights: " + file, file.canExecute());
- assertEquals("Bonjour Monde", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
@Test
@@ -89,14 +89,11 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport {
public void testScpProducePrivateKey() throws Exception {
Assume.assumeTrue(this.isSetupComplete());
+ getMockEndpoint("mock:result").expectedMessageCount(1);
+
String uri = getScpUri() + "?username=admin&privateKeyFile=src/test/resources/camel-key.priv&privateKeyFilePassphrase=password&knownHostsFile=" + getKnownHostsFile();
template.sendBodyAndHeader(uri, "Hallo Welt", Exchange.FILE_NAME, "welt.txt");
- Thread.sleep(1000);
- File file = new File(getScpPath() + "/welt.txt");
- assertFileExists(file.getAbsolutePath());
- // Mina sshd we use for testing ignores file perms;
- // assertFalse("File should not have execute rights: " + file, file.canExecute());
- assertEquals("Hallo Welt", context.getTypeConverter().convertTo(String.class, file));
+ assertMockEndpointsSatisfied();
}
}