camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r765154 - in /camel/trunk/components/camel-script/src/test/java/org/apache/camel: ./ builder/script/ builder/script/example/ language/script/
Date Wed, 15 Apr 2009 12:31:06 GMT
Author: davsclaus
Date: Wed Apr 15 12:31:05 2009
New Revision: 765154

URL: http://svn.apache.org/viewvc?rev=765154&view=rev
Log:
camel-script cannot run be tested on Max OS with jdk1.5.

Added:
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/ScriptTestHelper.java
  (with props)
Modified:
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/BeanShellScriptRouteTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/GroovyScriptRouteTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/JavaScriptExpressionTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/PythonExpressionTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyExpressionTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/AnyLanguageFilterTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/BeanShellFilterTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/GroovyFilterTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/JavaScriptFilterTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/PythonFilterTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/RubyFilterTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/JavaScriptLanguageTest.java
    camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/PythonLanguageTest.java

Added: camel/trunk/components/camel-script/src/test/java/org/apache/camel/ScriptTestHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/ScriptTestHelper.java?rev=765154&view=auto
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/ScriptTestHelper.java
(added)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/ScriptTestHelper.java
Wed Apr 15 12:31:05 2009
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+/**
+ * Script test helper.
+ *
+ * @version $Revision$
+ */
+public final class ScriptTestHelper {
+
+    private ScriptTestHelper() {
+    }
+
+    public static boolean canRunTestOnThisPlatform() {
+        // we cannot run unit tests on Mac with JDK 1.5
+
+        String version = System.getProperty("java.version");
+        String[] numbers = version.split("\\.");
+        if (Integer.valueOf(numbers[0]) > 1 || Integer.valueOf(numbers[1]) > 5) {
+            // JDK 1.6 or newer (eg JDK 2.x)
+            return true;
+        }
+
+        // for JDK 1.5 or lower we can run on any platform except Apple/MacOSx
+        String os = System.getProperty("os.name");
+        return !os.startsWith("Mac");
+    }
+
+}

Propchange: camel/trunk/components/camel-script/src/test/java/org/apache/camel/ScriptTestHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-script/src/test/java/org/apache/camel/ScriptTestHelper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/BeanShellScriptRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/BeanShellScriptRouteTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/BeanShellScriptRouteTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/BeanShellScriptRouteTest.java
Wed Apr 15 12:31:05 2009
@@ -20,10 +20,10 @@
 import java.util.Map;
 
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.RouteBuilder;
 
-import static org.apache.camel.builder.script.ScriptBuilder.script;;
-
+import static org.apache.camel.builder.script.ScriptBuilder.script;
 
 /**
  * Unit test for a BeanSheel script
@@ -31,6 +31,10 @@
 public class BeanShellScriptRouteTest extends ContextTestSupport {
 
     public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         getMockEndpoint("mock:result").expectedMessageCount(1);
         getMockEndpoint("mock:unmatched").expectedMessageCount(0);
 
@@ -42,6 +46,10 @@
     }
 
     public void testSendNonMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         getMockEndpoint("mock:result").expectedMessageCount(0);
         getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/GroovyScriptRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/GroovyScriptRouteTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/GroovyScriptRouteTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/GroovyScriptRouteTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script;
 
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
@@ -26,6 +27,10 @@
 public class GroovyScriptRouteTest extends ContextTestSupport {
 
     public void testGroovyScript() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello World");
         mock.expectedHeaderReceived("foo", "Hello World");

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/JavaScriptExpressionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/JavaScriptExpressionTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/JavaScriptExpressionTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/JavaScriptExpressionTest.java
Wed Apr 15 12:31:05 2009
@@ -20,6 +20,7 @@
 import java.util.Map;
 
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
@@ -29,6 +30,10 @@
 public class JavaScriptExpressionTest extends ContextTestSupport {
     
     public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         // TODO Currently, this test fails because the JavaScript expression in createRouteBuilder
         // below returns false
         // To fix that, we need to figure out how to get the expression to return the right
value
@@ -46,6 +51,10 @@
     }
 
     public void testSendNonMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         getMockEndpoint("mock:result").expectedMessageCount(0);
         getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java
Wed Apr 15 12:31:05 2009
@@ -24,6 +24,7 @@
 import javax.script.ScriptEngineManager;
 
 import junit.framework.TestCase;
+import org.apache.camel.ScriptTestHelper;
 
 /**
  * @version $Revision$
@@ -32,6 +33,10 @@
     private String [] scriptNames = {"beanshell", "groovy", "js", "python", "ruby", "javascript"};
 
     public void testLanguageNames() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         ScriptEngineManager manager = new ScriptEngineManager();
         for (String scriptName : scriptNames) {
             ScriptEngine engine = manager.getEngineByName(scriptName);

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/PythonExpressionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/PythonExpressionTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/PythonExpressionTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/PythonExpressionTest.java
Wed Apr 15 12:31:05 2009
@@ -20,6 +20,7 @@
 import java.util.Map;
 
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.RouteBuilder;
 
 /**
@@ -28,6 +29,10 @@
 public class PythonExpressionTest extends ContextTestSupport {
     
     public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         getMockEndpoint("mock:result").expectedMessageCount(1);
         getMockEndpoint("mock:unmatched").expectedMessageCount(0);
 
@@ -39,6 +44,10 @@
     }
 
     public void testSendNonMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         getMockEndpoint("mock:result").expectedMessageCount(0);
         getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyExpressionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyExpressionTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyExpressionTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyExpressionTest.java
Wed Apr 15 12:31:05 2009
@@ -20,6 +20,7 @@
 import java.util.Map;
 
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.RouteBuilder;
 
 /**
@@ -28,6 +29,10 @@
 public class RubyExpressionTest extends ContextTestSupport {
 
     public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         getMockEndpoint("mock:result").expectedMessageCount(1);
         getMockEndpoint("mock:unmatched").expectedMessageCount(0);
 
@@ -39,6 +44,10 @@
     }
 
     public void testSendNonMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         getMockEndpoint("mock:result").expectedMessageCount(0);
         getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/AnyLanguageFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/AnyLanguageFilterTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/AnyLanguageFilterTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/AnyLanguageFilterTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.example;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.NoRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.XPathFilterTest;
@@ -29,6 +30,24 @@
 public class AnyLanguageFilterTest extends XPathFilterTest {
 
     @Override
+    public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendMatchingMessage();
+    }
+
+    @Override
+    public void testSendNotMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendNotMatchingMessage();
+    }
+
+    @Override
     protected CamelContext createCamelContext() throws Exception {
         return SpringCamelContext.springCamelContext(new ClassPathXmlApplicationContext("org/apache/camel/builder/script/example/anyLanguageFilter.xml"));
     }

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/BeanShellFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/BeanShellFilterTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/BeanShellFilterTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/BeanShellFilterTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.example;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.NoRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.XPathFilterTest;
@@ -29,6 +30,24 @@
 public class BeanShellFilterTest extends XPathFilterTest {
 
     @Override
+    public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendMatchingMessage();
+    }
+
+    @Override
+    public void testSendNotMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendNotMatchingMessage();
+    }
+
+    @Override
     protected CamelContext createCamelContext() throws Exception {
         return SpringCamelContext.springCamelContext(new ClassPathXmlApplicationContext("org/apache/camel/builder/script/example/beanShellFilter.xml"));
     }

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/GroovyFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/GroovyFilterTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/GroovyFilterTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/GroovyFilterTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.example;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.NoRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.XPathFilterTest;
@@ -27,6 +28,25 @@
  * @version $Revision$
  */
 public class GroovyFilterTest extends XPathFilterTest {
+
+    @Override
+    public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendMatchingMessage();
+    }
+
+    @Override
+    public void testSendNotMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendNotMatchingMessage();
+    }
+
     @Override
     protected CamelContext createCamelContext() throws Exception {
         return SpringCamelContext.springCamelContext(new ClassPathXmlApplicationContext("org/apache/camel/builder/script/example/groovyFilter.xml"));

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/JavaScriptFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/JavaScriptFilterTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/JavaScriptFilterTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/JavaScriptFilterTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.example;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.NoRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.XPathFilterTest;
@@ -27,7 +28,25 @@
  * @version $Revision$
  */
 public class JavaScriptFilterTest extends XPathFilterTest {
-    
+
+    @Override
+    public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendMatchingMessage();
+    }
+
+    @Override
+    public void testSendNotMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendNotMatchingMessage();
+    }
+
     @Override
     protected CamelContext createCamelContext() throws Exception {
         return SpringCamelContext.springCamelContext(new ClassPathXmlApplicationContext("org/apache/camel/builder/script/example/javaScriptFilter.xml"));

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/PythonFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/PythonFilterTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/PythonFilterTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/PythonFilterTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.example;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.NoRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.XPathFilterTest;
@@ -29,6 +30,24 @@
 public class PythonFilterTest extends XPathFilterTest {
 
     @Override
+    public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendMatchingMessage();
+    }
+
+    @Override
+    public void testSendNotMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendNotMatchingMessage();
+    }
+
+    @Override
     protected CamelContext createCamelContext() throws Exception {
         return SpringCamelContext.springCamelContext(new ClassPathXmlApplicationContext("org/apache/camel/builder/script/example/pythonFilter.xml"));
     }

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/RubyFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/RubyFilterTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/RubyFilterTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/example/RubyFilterTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.builder.script.example;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.ScriptTestHelper;
 import org.apache.camel.builder.NoRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.XPathFilterTest;
@@ -29,6 +30,24 @@
 public class RubyFilterTest extends XPathFilterTest {
 
     @Override
+    public void testSendMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendMatchingMessage();
+    }
+
+    @Override
+    public void testSendNotMatchingMessage() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
+        super.testSendNotMatchingMessage();
+    }
+
+    @Override
     protected CamelContext createCamelContext() throws Exception {
         return SpringCamelContext.springCamelContext(new ClassPathXmlApplicationContext("org/apache/camel/builder/script/example/rubyFilter.xml"));
     }

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/JavaScriptLanguageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/JavaScriptLanguageTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/JavaScriptLanguageTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/JavaScriptLanguageTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.language.script;
 
 import org.apache.camel.LanguageTestSupport;
+import org.apache.camel.ScriptTestHelper;
 
 /**
  * @version $Revision$
@@ -24,6 +25,10 @@
 public class JavaScriptLanguageTest extends LanguageTestSupport {
     
     public void testLanguageExpressions() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         assertExpression("exchange.getIn()", "Message: <hello id='m123'>world!</hello>");
         assertExpression("exchange.getIn().body", "<hello id='m123'>world!</hello>");
         assertExpression("request.headers.get('foo')", "abc");

Modified: camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/PythonLanguageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/PythonLanguageTest.java?rev=765154&r1=765153&r2=765154&view=diff
==============================================================================
--- camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/PythonLanguageTest.java
(original)
+++ camel/trunk/components/camel-script/src/test/java/org/apache/camel/language/script/PythonLanguageTest.java
Wed Apr 15 12:31:05 2009
@@ -17,6 +17,7 @@
 package org.apache.camel.language.script;
 
 import org.apache.camel.LanguageTestSupport;
+import org.apache.camel.ScriptTestHelper;
 
 /**
  * @version $Revision$
@@ -24,6 +25,10 @@
 public class PythonLanguageTest extends LanguageTestSupport {
     
     public void testLanguageExpressions() throws Exception {
+        if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+            return;
+        }
+
         // the properties are stored in a set so ordering is not known
         assertExpression("exchange.in.headers", "{foo=abc, bar=123}", "{bar=123, foo=abc}");
         



Mime
View raw message