You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2008/10/27 17:21:48 UTC
svn commit: r708229 - in /activemq/camel/trunk/components/camel-script:
pom.xml src/test/java/org/apache/camel/builder/script/Jsr223Test.java
Author: janstey
Date: Mon Oct 27 09:21:47 2008
New Revision: 708229
URL: http://svn.apache.org/viewvc?rev=708229&view=rev
Log:
CAMEL-939 - Disable ruby script tests on IBM JDK. See JRUBY-3073 for more details.
I didn't disable ruby scripting in the runtime just in case a future jruby dependency
fixes the issue (basically didn't ewant to cripple camel is any way).
Modified:
activemq/camel/trunk/components/camel-script/pom.xml
activemq/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java
Modified: activemq/camel/trunk/components/camel-script/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/pom.xml?rev=708229&r1=708228&r2=708229&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/pom.xml (original)
+++ activemq/camel/trunk/components/camel-script/pom.xml Mon Oct 27 09:21:47 2008
@@ -194,4 +194,39 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>on-ibmjdk</id>
+ <activation>
+ <property>
+ <name>java.vendor</name>
+ <value>IBM Corporation</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>pertest</forkMode>
+ <childDelegation>false</childDelegation>
+ <useFile>true</useFile>
+ <includes>
+ <include>**/*Test.*</include>
+ </includes>
+ <!-- TODO: beanshell doesnt work on java 5 yet with the bsh-engine we got in pom right now -->
+ <!-- TODO: Ruby scripting doesn't work on IBM's JDK
+ See http://jira.codehaus.org/browse/JRUBY-3073 -->
+ <excludes>
+ <exclude>**/BeanShellScriptRouteTest.*</exclude>
+ <exclude>**/BeanShellFilterTest.*</exclude>
+ <exclude>**/Ruby*Test.*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: activemq/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java?rev=708229&r1=708228&r2=708229&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java (original)
+++ activemq/camel/trunk/components/camel-script/src/test/java/org/apache/camel/builder/script/Jsr223Test.java Mon Oct 27 09:21:47 2008
@@ -16,6 +16,10 @@
*/
package org.apache.camel.builder.script;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@@ -25,11 +29,18 @@
* @version $Revision$
*/
public class Jsr223Test extends TestCase {
- private static String [] scriptNames = {"beanshell", "groovy", "js", "python", "ruby", "javascript"};
+ private String [] scriptNames = {"beanshell", "groovy", "js", "python", "ruby", "javascript"};
public void testLanguageNames() throws Exception {
+ // ruby scripting does not work on IBM's JDK
+ // see http://jira.codehaus.org/browse/JRUBY-3073
+ ArrayList<String> scriptNamesAsList = new ArrayList<String>(Arrays.asList(scriptNames));
+ if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+ scriptNamesAsList.remove("ruby");
+ }
+
ScriptEngineManager manager = new ScriptEngineManager();
- for (String scriptName : scriptNames) {
+ for (String scriptName : scriptNamesAsList) {
ScriptEngine engine = manager.getEngineByName(scriptName);
assertNotNull("We should get the script engine for " + scriptName , engine);
}