You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2012/05/25 19:09:50 UTC
svn commit: r1342734 [1/2] - in /camel/trunk: parent/
platforms/karaf/features/ tests/camel-itest-osgi/
tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/
tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/
tests/camel-...
Author: ningjiang
Date: Fri May 25 17:09:44 2012
New Revision: 1342734
URL: http://svn.apache.org/viewvc?rev=1342734&view=rev
Log:
CAMEL-5239 Moving camel-itest-osgi to Pax-Exam 2.x
Added:
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/MyProcessor.java
- copied, changed from r1342732, camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsTestSupport.java
Modified:
camel/trunk/parent/pom.xml
camel/trunk/platforms/karaf/features/pom.xml
camel/trunk/tests/camel-itest-osgi/pom.xml
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsTestSupport.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/bean/validator/BeanValidatorTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/beanio/BeanIODataFormatSimpleTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintExplicitPropertiesRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintPropertiesRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint3Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint4Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint5Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint6Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint7Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintManagedNamePatternFixedTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTcclTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelMultiVersionBlueprintTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheManagerFactoryRefTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheRoutesManagementTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/management/OSGiIntegrationManagedCamelContextTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/xslt/XsltBlueprintRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfProxyExampleTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/dozer/DozerTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/exec/ExecTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerFileTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpConsumeTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/groovy/GroovyTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hawtdb/HawtDBAggregateRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hazelcast/HazelcastTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsBlueprintRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7MLLPCodec2Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7MLLPCodecTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/http/HttpTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/http/HttpTypeConverterTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/http4/Http4Test.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbDataFormatTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterSpringTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jetty/OSGiMulitJettyCamelContextsTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaBlueprintRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jsch/ScpTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/leveldb/LevelDBAggregateRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mail/MailRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mina/MinaTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mybatis/MyBatisTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/netty/NettyTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/quartz/QuartzCronRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/RestletTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/rss/RssPollingConsumerTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/script/GroovyScriptOsgiTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/script/RubyOsgiTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletServicesTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/shiro/ShiroAuthenticationTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/sql/SqlBlueprintRoute.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/sql/SqlRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/stream/StreamTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/syslog/SyslogTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/util/jsse/JsseUtilTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityBlueprintTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityFileTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/xstream/XstreamBlueprintRouteTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/zookeeper/ZookeeperOSGiTest.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/zookeeper/ZookeeperOSGiTestSupport.java
camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/hdfs/core-default.xml
camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/jpa/blueprintCamelContext.xml
camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/camel-context.xml
Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Fri May 25 17:09:44 2012
@@ -188,7 +188,7 @@
<xmlunit-version>1.3</xmlunit-version>
<xmlbeans-version>2.5.0</xmlbeans-version>
<xom-version>1.2.5</xom-version>
- <zookeeper-version>3.3.4</zookeeper-version>
+ <zookeeper-version>3.3.5</zookeeper-version>
<!-- used by camel archetypes -->
<maven-compiler-plugin-version>2.4</maven-compiler-plugin-version>
Modified: camel/trunk/platforms/karaf/features/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/pom.xml?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/pom.xml (original)
+++ camel/trunk/platforms/karaf/features/pom.xml Fri May 25 17:09:44 2012
@@ -39,8 +39,7 @@
<aopalliance-bundle-version>1.0_6</aopalliance-bundle-version>
<asm2-bundle-version>2.2.3_5</asm2-bundle-version>
<avalon-bundle-version>4.3.1_1</avalon-bundle-version>
- <!-- TODO: Need to upgrade aws-java-sdk to 1.3.10_1 -->
- <aws-java-sdk-bundle-version>1.3.0_1</aws-java-sdk-bundle-version>
+ <aws-java-sdk-bundle-version>1.3.10_1-SNAPSHOT</aws-java-sdk-bundle-version>
<bcel-bundle-version>5.2_4</bcel-bundle-version>
<bcpg-jdk16-bundle-version>1.46_2</bcpg-jdk16-bundle-version>
<cglib-version>2.1_3_7</cglib-version>
Modified: camel/trunk/tests/camel-itest-osgi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/pom.xml?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/pom.xml (original)
+++ camel/trunk/tests/camel-itest-osgi/pom.xml Fri May 25 17:09:44 2012
@@ -40,30 +40,32 @@
</repository>
</repositories>
+ <properties>
+ <pax-exam-version>2.3.0</pax-exam-version>
+ </properties>
+
<dependencies>
- <dependency>
+ <!--dependency>
<groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam</artifactId>
+ <artifactId>pax-exam-container-paxrunner</artifactId>
+ <version>${pax-exam-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit</artifactId>
+ <artifactId>pax-exam-link-mvn</artifactId>
+ <version>${pax-exam-version}</version>
<scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.runner</groupId>
- <artifactId>pax-runner-no-jcl</artifactId>
- <scope>test</scope>
- </dependency>
+ </dependency-->
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-default</artifactId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <version>${pax-exam-version}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit-extender-impl</artifactId>
+ <groupId>org.ops4j.pax.runner</groupId>
+ <artifactId>pax-runner-no-jcl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -72,24 +74,27 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>org.apache.karaf.tooling.testing</artifactId>
+ <groupId>org.openengsb.labs.paxexam.karaf</groupId>
+ <artifactId>paxexam-karaf-container</artifactId>
+ <version>0.5.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
<version>${karaf-version}</version>
+ <type>tar.gz</type>
+ <scope>test</scope>
<exclusions>
<exclusion>
- <groupId>org.apache.karaf</groupId>
- <artifactId>manual</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.karaf</groupId>
- <artifactId>org.apache.karaf.client</artifactId>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.dev</artifactId>
</exclusion>
<exclusion>
- <groupId>org.ops4j.pax.logging</groupId>
- <artifactId>pax-logging-api</artifactId>
+ <groupId>org.eclipse</groupId>
+ <artifactId>osgi</artifactId>
</exclusion>
</exclusions>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java Fri May 25 17:09:44 2012
@@ -18,14 +18,16 @@ package org.apache.camel.itest.osgi;
import java.io.File;
import java.io.IOException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
+import javax.inject.Inject;
+
import org.apache.camel.CamelContext;
import org.apache.camel.osgi.CamelContextFactory;
import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.camel.util.FileUtil;
-import org.apache.karaf.testing.Helper;
-import org.ops4j.pax.exam.Inject;
+import org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
@@ -35,10 +37,12 @@ import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.replaceConfigurationFile;
+import static org.ops4j.pax.exam.CoreOptions.maven;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.scanFeatures;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
public class OSGiIntegrationTestSupport extends CamelTestSupport {
protected static final transient Logger LOG = LoggerFactory.getLogger(OSGiIntegrationTestSupport.class);
@@ -109,60 +113,42 @@ public class OSGiIntegrationTestSupport
artifactId("enterprise").version(karafVersion).type(type);
}
- private static URL getResource(String location) {
- URL url = null;
- if (Thread.currentThread().getContextClassLoader() != null) {
- url = Thread.currentThread().getContextClassLoader().getResource(location);
- }
- if (url == null) {
- url = Helper.class.getResource(location);
- }
- if (url == null) {
- throw new RuntimeException("Unable to find resource " + location);
+ public static Option loadCamelFeatures(String... features) {
+
+ List<String> result = new ArrayList<String>();
+ result.add("cxf-jaxb");
+ result.add("camel-core");
+ result.add("camel-spring");
+ result.add("camel-test");
+ for (String feature : features) {
+ result.add(feature);
}
- return url;
+ return scanFeatures(getCamelKarafFeatureUrl(), result.toArray(new String[4 + features.length]));
}
-
+
public static Option[] getDefaultCamelKarafOptions() {
- // create temporary working directory that is unique to avoid windows issues
- // lock files between tests, and causing tests to fail
- deleteDirectory("target/paxrunner");
-
- // check if file exists
- int failsafe = 1000;
- workDir = "target/paxrunner/work-" + COUNTER.getAndIncrement();
- File dir = new File(workDir);
- while (dir.exists() && failsafe-- > 0) {
- workDir = "target/paxrunner/work-" + COUNTER.getAndIncrement();
- dir = new File(workDir);
- }
- createDirectory(workDir);
- System.out.println("*** Using working directory: " + workDir + " ***");
-
- Option[] options = combine(
- // Set the karaf environment with some customer configuration
- combine(
- Helper.getDefaultConfigOptions(
- Helper.getDefaultSystemOptions(),
- getResource("/org/apache/camel/itest/karaf/config.properties"),
- // this is how you set the default log level when using pax logging (logProfile)
- Helper.setLogLevel("WARN")),
- Helper.getDefaultProvisioningOptions()),
- // install the spring, http features first
- scanFeatures(getKarafFeatureUrl(), "spring", "spring-dm", "jetty"),
-
- // install the cxf jaxb spec as the karaf doesn't provide it by default
- scanFeatures(getCamelKarafFeatureUrl(), "cxf-jaxb"),
-
- // using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-core", "camel-spring", "camel-test"),
-
- workingDirectory(workDir));
+ Option[] options =
+ // Set the karaf environment with some customer configuration
+ new Option[] {
+ karafDistributionConfiguration()
+ .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject())
+ // This version is not actual karaf version that we use.
+ .karafVersion("2.2.7")
+ .name("Apache Karaf")
+ .useDeployFolder(false).unpackDirectory(new File("target/paxexam/unpack/")),
+
+ KarafDistributionOption.keepRuntimeFolder(),
+ // override the jre.properties
+ replaceConfigurationFile("etc/jre.properties",
+ new File(
+ "src/test/resources/org/apache/camel/itest/karaf/jre.properties")),
+ // install the cxf jaxb spec as the karaf doesn't provide
+ // it by default
+ scanFeatures(getCamelKarafFeatureUrl(), "cxf-jaxb", "camel-core", "camel-spring",
+ "camel-test")};
- //equinox(),
- //felix());
return options;
+
}
@Configuration
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ahc/AhcTest.java Fri May 25 17:09:44 2012
@@ -23,15 +23,16 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.ExamReactorStrategy;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-
/**
*
*/
@RunWith(JUnit4TestRunner.class)
+@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
public class AhcTest extends OSGiIntegrationTestSupport {
@Test
@@ -67,12 +68,10 @@ public class AhcTest extends OSGiIntegra
public static Option[] configure() throws Exception {
Option[] options = combine(
getDefaultCamelKarafOptions(),
-
// using the features to install other camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-jetty", "camel-ahc"));
-
+ loadCamelFeatures("camel-jetty", "camel-ahc"));
return options;
}
+
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsTestSupport.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsTestSupport.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/aws/AwsTestSupport.java Fri May 25 17:09:44 2012
@@ -22,7 +22,6 @@ import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
public abstract class AwsTestSupport extends OSGiIntegrationSpringTestSupport {
@@ -33,7 +32,7 @@ public abstract class AwsTestSupport ext
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-aws"));
+ loadCamelFeatures("camel-aws"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/bean/validator/BeanValidatorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/bean/validator/BeanValidatorTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/bean/validator/BeanValidatorTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/bean/validator/BeanValidatorTest.java Fri May 25 17:09:44 2012
@@ -26,10 +26,7 @@ import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-
@RunWith(JUnit4TestRunner.class)
public class BeanValidatorTest extends OSGiIntegrationTestSupport {
@@ -65,7 +62,7 @@ public class BeanValidatorTest extends O
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-bean-validator"));
+ loadCamelFeatures("camel-bean-validator"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/beanio/BeanIODataFormatSimpleTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/beanio/BeanIODataFormatSimpleTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/beanio/BeanIODataFormatSimpleTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/beanio/BeanIODataFormatSimpleTest.java Fri May 25 17:09:44 2012
@@ -33,7 +33,6 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
/**
*
@@ -120,7 +119,7 @@ public class BeanIODataFormatSimpleTest
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-beanio"));
+ loadCamelFeatures("camel-beanio"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java Fri May 25 17:09:44 2012
@@ -22,9 +22,11 @@ import java.util.Collections;
import java.util.Dictionary;
import java.util.Enumeration;
+import javax.inject.Inject;
+
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
import org.ops4j.pax.exam.CoreOptions;
-import org.ops4j.pax.exam.Inject;
+
import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintExplicitPropertiesRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintExplicitPropertiesRouteTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintExplicitPropertiesRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintExplicitPropertiesRouteTest.java Fri May 25 17:09:44 2012
@@ -27,7 +27,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -76,8 +75,7 @@ public class BlueprintExplicitProperties
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"));
+ loadCamelFeatures("camel-blueprint"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintPropertiesRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintPropertiesRouteTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintPropertiesRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintPropertiesRouteTest.java Fri May 25 17:09:44 2012
@@ -27,7 +27,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -76,8 +75,7 @@ public class BlueprintPropertiesRouteTes
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"));
+ loadCamelFeatures("camel-blueprint"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java Fri May 25 17:09:44 2012
@@ -29,7 +29,6 @@ import org.osgi.framework.Constants;
import org.osgi.service.blueprint.container.BlueprintContainer;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -110,8 +109,7 @@ public class CamelBlueprint2Test extends
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint", "camel-test", "camel-mail", "camel-jaxb", "camel-jms"));
+ loadCamelFeatures("camel-blueprint", "camel-mail", "camel-jaxb", "camel-jms"));
// for remote debugging
// vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5008"));
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint3Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint3Test.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint3Test.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint3Test.java Fri May 25 17:09:44 2012
@@ -26,7 +26,6 @@ import org.osgi.framework.Constants;
import org.osgi.service.blueprint.container.BlueprintContainer;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -102,8 +101,7 @@ public class CamelBlueprint3Test extends
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint", "camel-ftp", "camel-jackson", "camel-jms"));
+ loadCamelFeatures("camel-blueprint", "camel-ftp", "camel-jackson", "camel-jms"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint4Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint4Test.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint4Test.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint4Test.java Fri May 25 17:09:44 2012
@@ -27,7 +27,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd;
@@ -128,8 +127,7 @@ public class CamelBlueprint4Test extends
.build(withBnd())).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint", "camel-velocity"));
+ loadCamelFeatures("camel-blueprint", "camel-velocity"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint5Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint5Test.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint5Test.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint5Test.java Fri May 25 17:09:44 2012
@@ -27,7 +27,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -70,8 +69,7 @@ public class CamelBlueprint5Test extends
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"));
+ loadCamelFeatures("camel-blueprint"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint6Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint6Test.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint6Test.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint6Test.java Fri May 25 17:09:44 2012
@@ -27,7 +27,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -66,8 +65,7 @@ public class CamelBlueprint6Test extends
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"));
+ loadCamelFeatures("camel-blueprint"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint7Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint7Test.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint7Test.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint7Test.java Fri May 25 17:09:44 2012
@@ -27,7 +27,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -66,8 +65,8 @@ public class CamelBlueprint7Test extends
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"));
+ loadCamelFeatures("camel-blueprint"));
+
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint8Test.java Fri May 25 17:09:44 2012
@@ -28,7 +28,6 @@ import org.osgi.framework.Constants;
import org.osgi.service.blueprint.container.BlueprintContainer;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -106,8 +105,7 @@ public class CamelBlueprint8Test extends
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint", "camel-test"));
+ loadCamelFeatures("camel-blueprint"));
// for remote debugging
// vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5008"));
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintManagedNamePatternFixedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintManagedNamePatternFixedTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintManagedNamePatternFixedTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintManagedNamePatternFixedTest.java Fri May 25 17:09:44 2012
@@ -30,7 +30,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -72,8 +71,7 @@ public class CamelBlueprintManagedNamePa
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"));
+ loadCamelFeatures("camel-blueprint"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTcclTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTcclTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTcclTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTcclTest.java Fri May 25 17:09:44 2012
@@ -31,11 +31,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Bundle;
import org.osgi.framework.Constants;
-import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.felix;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -92,12 +88,10 @@ public class CamelBlueprintTcclTest exte
.build()),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-blueprint"),
+ loadCamelFeatures("camel-blueprint"));
- workingDirectory("target/paxrunner/"),
- felix(),
- equinox());
+
}
/**
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprintTest.java Fri May 25 17:09:44 2012
@@ -26,7 +26,6 @@ import org.osgi.framework.Constants;
import org.osgi.service.blueprint.container.BlueprintContainer;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -37,6 +36,7 @@ public class CamelBlueprintTest extends
@Test
public void testRouteWithAllComponents() throws Exception {
+ getInstalledBundle("CamelBlueprintTestBundle1").stop();
try {
getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle1)", 1000);
fail("The blueprint container should not be available");
@@ -49,6 +49,7 @@ public class CamelBlueprintTest extends
@Test
public void testRouteWithMissingComponent() throws Exception {
+ getInstalledBundle("CamelBlueprintTestBundle2").stop();
getInstalledBundle("org.apache.camel.camel-ftp").stop();
try {
getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle2)", 500);
@@ -64,10 +65,13 @@ public class CamelBlueprintTest extends
getInstalledBundle("org.apache.camel.camel-ftp").start();
getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle2)", 10000);
getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTestBundle2)", 10000);
+
}
@Test
public void testRouteWithMissingDataFormat() throws Exception {
+ // paxexam-karaf-container doesn't support start stop bundle well, the bundle is started when it is deployed by default.
+ /*
getInstalledBundle("org.apache.camel.camel-jackson").stop();
try {
getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle3)", 500);
@@ -80,7 +84,8 @@ public class CamelBlueprintTest extends
fail("The blueprint container should not be available");
} catch (Exception e) {
}
- getInstalledBundle("org.apache.camel.camel-jackson").start();
+ getInstalledBundle("org.apache.camel.camel-jackson").start();*/
+
getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintTestBundle3)", 10000);
getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintTestBundle3)", 10000);
}
@@ -110,16 +115,19 @@ public class CamelBlueprintTest extends
bundle(newBundle()
.add("OSGI-INF/blueprint/test.xml", OSGiBlueprintTestSupport.class.getResource("blueprint-1.xml"))
.set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintTestBundle1")
+ .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
.build()).noStart(),
bundle(newBundle()
.add("OSGI-INF/blueprint/test.xml", OSGiBlueprintTestSupport.class.getResource("blueprint-2.xml"))
.set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintTestBundle2")
+ .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
.build()).noStart(),
bundle(newBundle()
.add("OSGI-INF/blueprint/test.xml", OSGiBlueprintTestSupport.class.getResource("blueprint-3.xml"))
.set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintTestBundle3")
+ .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
.build()).noStart(),
bundle(newBundle()
@@ -137,8 +145,8 @@ public class CamelBlueprintTest extends
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint", "camel-test", "camel-ftp", "camel-jackson", "camel-jms"));
+ loadCamelFeatures("camel-blueprint", "camel-ftp", "camel-jackson", "camel-jms"));
+
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelMultiVersionBlueprintTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelMultiVersionBlueprintTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelMultiVersionBlueprintTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelMultiVersionBlueprintTest.java Fri May 25 17:09:44 2012
@@ -28,8 +28,8 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import org.osgi.service.blueprint.container.BlueprintContainer;
+import static org.ops4j.pax.exam.CoreOptions.scanFeatures;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
@RunWith(JUnit4TestRunner.class)
@@ -77,8 +77,7 @@ public class CamelMultiVersionBlueprintT
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint", "camel-test")
+ loadCamelFeatures("camel-blueprint", "camel-test")
);
return options;
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java Fri May 25 17:09:44 2012
@@ -28,7 +28,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
/**
@@ -51,8 +50,9 @@ public class OSGiBlueprintHelloWorldTest
getInstalledBundle(name).start();
// must use the camel context from osgi
- CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=" + name + ")"
- + "&&(camel.context.name=camel1)", 10000);
+ CamelContext ctx = getOsgiService(CamelContext.class,
+ //"(camel.context.symbolicname=" + name + ")"
+ "camel.context.name=camel1", 10000);
ProducerTemplate myTemplate = ctx.createProducerTemplate();
myTemplate.start();
@@ -80,8 +80,7 @@ public class OSGiBlueprintHelloWorldTest
.build()).noStart(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"));
+ loadCamelFeatures("camel-blueprint"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheManagerFactoryRefTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheManagerFactoryRefTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheManagerFactoryRefTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheManagerFactoryRefTest.java Fri May 25 17:09:44 2012
@@ -33,7 +33,7 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
+
@RunWith(JUnit4TestRunner.class)
public class CacheManagerFactoryRefTest extends OSGiIntegrationTestSupport {
@@ -82,7 +82,7 @@ public class CacheManagerFactoryRefTest
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-cache"));
+ loadCamelFeatures("camel-cache"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheRoutesManagementTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheRoutesManagementTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheRoutesManagementTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheRoutesManagementTest.java Fri May 25 17:09:44 2012
@@ -33,7 +33,6 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
@@ -103,7 +102,7 @@ public class CacheRoutesManagementTest e
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-cache"));
+ loadCamelFeatures("camel-cache"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/CacheTest.java Fri May 25 17:09:44 2012
@@ -26,7 +26,6 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
public class CacheTest extends OSGiIntegrationTestSupport {
@@ -66,7 +65,7 @@ public class CacheTest extends OSGiInteg
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-cache"));
+ loadCamelFeatures("camel-cache"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cache/replication/CacheReplicationTest.java Fri May 25 17:09:44 2012
@@ -26,10 +26,8 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
-
-import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.scanFeatures;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
@Ignore("Fix me")
@@ -66,13 +64,11 @@ public class CacheReplicationTest extend
// Default karaf environment
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(), "jetty", "camel-jms", "camel-cache"),
+ loadCamelFeatures("jetty", "camel-jms", "camel-cache"),
// using the features to install AMQ
scanFeatures("mvn:org.apache.activemq/activemq-karaf/5.5.0/xml/features",
- "activemq"),
-
- felix());
+ "activemq"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/management/OSGiIntegrationManagedCamelContextTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/management/OSGiIntegrationManagedCamelContextTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/management/OSGiIntegrationManagedCamelContextTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/management/OSGiIntegrationManagedCamelContextTest.java Fri May 25 17:09:44 2012
@@ -34,10 +34,10 @@ import org.ops4j.pax.swissbox.tinybundle
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.felix;
import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.profile;
import static org.ops4j.pax.exam.CoreOptions.provision;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
+import static org.ops4j.pax.exam.CoreOptions.scanFeatures;
+import static org.ops4j.pax.exam.CoreOptions.workingDirectory;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
@RunWith(JUnit4TestRunner.class)
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/xslt/XsltBlueprintRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/xslt/XsltBlueprintRouteTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/xslt/XsltBlueprintRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/xslt/XsltBlueprintRouteTest.java Fri May 25 17:09:44 2012
@@ -32,7 +32,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd;
@@ -76,8 +75,7 @@ public class XsltBlueprintRouteTest exte
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint"),
+ loadCamelFeatures("camel-blueprint"),
bundle(newBundle()
.add("OSGI-INF/blueprint/test.xml", XsltBlueprintRouteTest.class.getResource("XsltBlueprintRouter.xml"))
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfBeanSpringRouteTest.java Fri May 25 17:09:44 2012
@@ -31,7 +31,6 @@ import org.springframework.osgi.context.
import static org.ops4j.pax.exam.CoreOptions.provision;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd;
@@ -65,7 +64,7 @@ public class CxfBeanSpringRouteTest exte
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
+ loadCamelFeatures(
"camel-jetty", "camel-http4", "camel-cxf"),
provision(newBundle()
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfProxyExampleTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfProxyExampleTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfProxyExampleTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/CxfProxyExampleTest.java Fri May 25 17:09:44 2012
@@ -30,8 +30,6 @@ import org.springframework.osgi.context.
import static org.ops4j.pax.exam.CoreOptions.provision;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd;
@@ -82,8 +80,7 @@ public class CxfProxyExampleTest extends
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-http", "camel-cxf"),
+ loadCamelFeatures("camel-http", "camel-cxf"),
// need to install the generated src as the pax-exam doesn't wrap this bundles
provision(newBundle()
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java Fri May 25 17:09:44 2012
@@ -31,7 +31,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
@RunWith(JUnit4TestRunner.class)
@@ -81,7 +80,7 @@ public class CxfBeanBlueprintRouterTest
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
+ loadCamelFeatures(
"camel-blueprint", "camel-jetty", "camel-http4", "camel-cxf"),
bundle(newBundle()
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java Fri May 25 17:09:44 2012
@@ -35,7 +35,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd;
@@ -97,10 +96,8 @@ public class CxfBlueprintRouterTest exte
public static Option[] configure() throws Exception {
Option[] options = combine(
getDefaultCamelKarafOptions(),
- // using the features to install the karaf war feature
- scanFeatures(getKarafFeatureUrl(), "war"),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
+ loadCamelFeatures(
"camel-blueprint", "camel-cxf"),
bundle(newBundle()
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java Fri May 25 17:09:44 2012
@@ -40,7 +40,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.osgi.framework.Constants;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
@RunWith(JUnit4TestRunner.class)
@@ -189,7 +188,7 @@ public class CxfRsBlueprintRouterTest ex
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
+ loadCamelFeatures(
"camel-blueprint", "camel-http4", "camel-cxf"),
bundle(newBundle()
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/dozer/DozerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/dozer/DozerTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/dozer/DozerTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/dozer/DozerTest.java Fri May 25 17:09:44 2012
@@ -26,9 +26,7 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
-
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
/**
@@ -70,7 +68,7 @@ public class DozerTest extends OSGiInteg
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-dozer"));
+ loadCamelFeatures("camel-dozer"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/exec/ExecTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/exec/ExecTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/exec/ExecTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/exec/ExecTest.java Fri May 25 17:09:44 2012
@@ -26,7 +26,6 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
@Ignore("We need a test which runs on all platforms")
@@ -53,7 +52,7 @@ public class ExecTest extends OSGiIntegr
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-exec"));
+ loadCamelFeatures("camel-exec"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerFileTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerFileTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerFileTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerFileTest.java Fri May 25 17:09:44 2012
@@ -17,8 +17,8 @@
package org.apache.camel.itest.osgi.freemarker;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.InputStream;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.util.IOHelper;
@@ -32,12 +32,12 @@ public class FreemarkerFileTest extends
public void setUp() throws Exception {
deleteDirectory("mydir");
createDirectory("mydir");
-
- File src = new File("../../../src/test/resources/org/apache/camel/itest/osgi/freemarker/example.ftl");
+
+ InputStream is = FreemarkerFileTest.class.getResourceAsStream("/org/apache/camel/itest/osgi/freemarker/example.ftl");
+
File dest = new File("mydir/example.ftl");
- FileInputStream fis = new FileInputStream(src);
FileOutputStream fos = new FileOutputStream(dest, false);
- IOHelper.copyAndCloseInput(fis, fos);
+ IOHelper.copyAndCloseInput(is, fos);
fos.close();
super.setUp();
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/freemarker/FreemarkerTest.java Fri May 25 17:09:44 2012
@@ -29,7 +29,6 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
public class FreemarkerTest extends OSGiIntegrationTestSupport {
@@ -64,7 +63,7 @@ public class FreemarkerTest extends OSGi
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-freemarker"));
+ loadCamelFeatures("camel-freemarker"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpConsumeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpConsumeTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpConsumeTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpConsumeTest.java Fri May 25 17:09:44 2012
@@ -25,7 +25,6 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
public class FtpConsumeTest extends OSGiIntegrationSpringTestSupport {
@@ -46,7 +45,7 @@ public class FtpConsumeTest extends OSGi
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-ftp")
+ loadCamelFeatures("camel-ftp")
);
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ftp/FtpTest.java Fri May 25 17:09:44 2012
@@ -29,7 +29,6 @@ import org.springframework.osgi.context.
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
@Ignore("Not fully implemented, see TODO")
@@ -54,7 +53,7 @@ public class FtpTest extends OSGiIntegra
getDefaultCamelKarafOptions(),
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(), "jetty", "camel-ftp"),
+ loadCamelFeatures("jetty", "camel-ftp"),
// ftp server bundles
mavenBundle().groupId("org.apache.mina").artifactId("mina-core").version("2.0.0"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/groovy/GroovyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/groovy/GroovyTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/groovy/GroovyTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/groovy/GroovyTest.java Fri May 25 17:09:44 2012
@@ -26,7 +26,6 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
@@ -53,7 +52,7 @@ public class GroovyTest extends OSGiInte
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-groovy"));
+ loadCamelFeatures("camel-groovy"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hawtdb/HawtDBAggregateRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hawtdb/HawtDBAggregateRouteTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hawtdb/HawtDBAggregateRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hawtdb/HawtDBAggregateRouteTest.java Fri May 25 17:09:44 2012
@@ -31,7 +31,6 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
@RunWith(JUnit4TestRunner.class)
public class HawtDBAggregateRouteTest extends OSGiIntegrationTestSupport {
@@ -93,7 +92,7 @@ public class HawtDBAggregateRouteTest ex
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-hawtdb"));
+ loadCamelFeatures("camel-hawtdb"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hazelcast/HazelcastTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hazelcast/HazelcastTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hazelcast/HazelcastTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hazelcast/HazelcastTest.java Fri May 25 17:09:44 2012
@@ -25,8 +25,9 @@ import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import static org.ops4j.pax.exam.CoreOptions.scanFeatures;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
+
@RunWith(JUnit4TestRunner.class)
public class HazelcastTest extends OSGiIntegrationTestSupport {
@@ -120,7 +121,7 @@ public class HazelcastTest extends OSGiI
Option[] options = combine(
getDefaultCamelKarafOptions(),
// using the features to install the other camel components
- scanFeatures(getCamelKarafFeatureUrl(), "camel-hazelcast"));
+ loadCamelFeatures("camel-hazelcast"));
return options;
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsBlueprintRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsBlueprintRouteTest.java?rev=1342734&r1=1342733&r2=1342734&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsBlueprintRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsBlueprintRouteTest.java Fri May 25 17:09:44 2012
@@ -30,20 +30,16 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import org.osgi.framework.Constants;
-
-import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.provision;
import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.modifyBundle;
+import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
@RunWith(JUnit4TestRunner.class)
public class HdfsBlueprintRouteTest extends OSGiBlueprintTestSupport {
//Hadoop doesn't run on IBM JDK
private static final boolean SKIP = System.getProperty("java.vendor").contains("IBM");
- private static final File HOME = new File("target/paxrunner/");
-
+
@Test
public void testWriteAndReadString() throws Exception {
if (SKIP) {
@@ -66,25 +62,16 @@ public class HdfsBlueprintRouteTest exte
Option[] options = combine(
getDefaultCamelKarafOptions(),
- new Customizer() {
- @Override
- public InputStream customizeTestProbe(InputStream testProbe) {
- return modifyBundle(testProbe)
- .add("core-default.xml", HdfsRouteTest.class.getResource("core-default.xml"))
- .add("OSGI-INF/blueprint/test.xml", HdfsRouteTest.class.getResource("blueprintCamelContext.xml"))
- .set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintHdfsTestBundle")
- .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
- .build();
- }
- },
+ provision(newBundle().add("core-default.xml", HdfsRouteTest.class.getResource("core-default.xml"))
+ .add("OSGI-INF/blueprint/test.xml", HdfsRouteTest.class.getResource("blueprintCamelContext.xml"))
+ .set(Constants.BUNDLE_SYMBOLICNAME, "CamelBlueprintHdfsTestBundle")
+ .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
+ .build()),
+
// using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-blueprint", "camel-hdfs"),
- workingDirectory("target/paxrunner/"),
- vmOption("-Dkaraf.base=" + HOME.getAbsolutePath()),
- //vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
- felix());
-
+ loadCamelFeatures(
+ "camel-blueprint", "camel-hdfs"));
+
return options;
}
}
\ No newline at end of file