You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ge...@apache.org on 2009/10/09 12:38:56 UTC
svn commit: r823510 - in
/felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests:
CoreTest.java FeaturesTest.java
Author: gertv
Date: Fri Oct 9 10:38:55 2009
New Revision: 823510
URL: http://svn.apache.org/viewvc?rev=823510&view=rev
Log:
FELIX-1728: Karaf itests fail on IBM JDK due to missing annotations
Modified:
felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/CoreTest.java
felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/FeaturesTest.java
Modified: felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/CoreTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/CoreTest.java?rev=823510&r1=823509&r2=823510&view=diff
==============================================================================
--- felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/CoreTest.java (original)
+++ felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/CoreTest.java Fri Oct 9 10:38:55 2009
@@ -22,11 +22,14 @@
import org.junit.runner.RunWith;
import static org.ops4j.pax.exam.CoreOptions.bootClasspathLibrary;
import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.maven;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemPackages;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
import org.ops4j.pax.exam.Option;
+import static org.ops4j.pax.exam.OptionUtils.combine;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import org.osgi.framework.Bundle;
@@ -139,6 +142,15 @@
equinox()
);
+ // We need to add pax-exam-junit here when running with the ibm
+ // jdk to avoid the following exception during the test run:
+ // ClassNotFoundException: org.ops4j.pax.exam.junit.Configuration
+ if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+ Option[] ibmOptions = options(
+ wrappedBundle(maven("org.ops4j.pax.exam", "pax-exam-junit"))
+ );
+ options = combine(ibmOptions, options);
+ }
return options;
}
Modified: felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/FeaturesTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/FeaturesTest.java?rev=823510&r1=823509&r2=823510&view=diff
==============================================================================
--- felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/FeaturesTest.java (original)
+++ felix/trunk/karaf/itests/src/test/java/org/apache/felix/karaf/shell/itests/FeaturesTest.java Fri Oct 9 10:38:55 2009
@@ -25,7 +25,9 @@
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemPackages;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
import org.ops4j.pax.exam.Option;
+import static org.ops4j.pax.exam.OptionUtils.combine;
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
@@ -91,6 +93,15 @@
equinox()
);
+ // We need to add pax-exam-junit here when running with the ibm
+ // jdk to avoid the following exception during the test run:
+ // ClassNotFoundException: org.ops4j.pax.exam.junit.Configuration
+ if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+ Option[] ibmOptions = options(
+ wrappedBundle(maven("org.ops4j.pax.exam", "pax-exam-junit"))
+ );
+ options = combine(ibmOptions, options);
+ }
return options;
}