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/04/02 15:37:32 UTC
svn commit: r1463531 -
/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java
Author: davsclaus
Date: Tue Apr 2 13:37:32 2013
New Revision: 1463531
URL: http://svn.apache.org/r1463531
Log:
Skip test on platforms having trouble running it on CI servers
Modified:
camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java
Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java?rev=1463531&r1=1463530&r2=1463531&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java (original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java Tue Apr 2 13:37:32 2013
@@ -17,6 +17,7 @@
package org.apache.camel.itest.ftp;
import java.io.File;
+import java.util.Locale;
import org.apache.camel.Endpoint;
import org.apache.camel.EndpointInject;
@@ -62,8 +63,25 @@ public class SpringFileAntPathMatcherRem
@EndpointInject(uri = "mock:result")
protected MockEndpoint result;
+ protected boolean canRunOnThisPlatform() {
+ String os = System.getProperty("os.name");
+ boolean aix = os.toLowerCase(Locale.ENGLISH).contains("aix");
+ boolean windows = os.toLowerCase(Locale.ENGLISH).contains("windows");
+ boolean solaris = os.toLowerCase(Locale.ENGLISH).contains("sunos");
+
+ // Does not work on AIX / solaris and the problem is hard to identify, could be issues not allowing to use a custom port
+ // java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi/camel
+
+ // windows CI servers is often slow/tricky so skip as well
+ return !aix && !solaris && !windows;
+ }
+
@Test
public void testAntPatchMatherFilter() throws Exception {
+ if (!canRunOnThisPlatform()) {
+ return;
+ }
+
result.expectedBodiesReceived(expectedBody);
template.sendBodyAndHeader(inputFTP, "Hello World", Exchange.FILE_NAME, "hello.txt");