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 2011/03/21 09:46:39 UTC
svn commit: r1083702 [2/2] - in /camel/trunk: parent/
tests/camel-itest-karaf/
tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
tests/camel-itest-osgi/
tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/
tests/camel-ite...
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=1083702&r1=1083701&r2=1083702&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 Mon Mar 21 08:46:37 2011
@@ -18,6 +18,7 @@ package org.apache.camel.itest.osgi.ftp;
import org.apache.camel.Exchange;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +29,7 @@ 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.CoreOptions.options;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+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;
@@ -50,15 +50,14 @@ public class FtpTest extends OSGiIntegra
assertMockEndpointsSatisfied();
}
-
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
+ Helper.setLogLevel("WARN")),
+
mavenBundle().groupId("org.apache.mina").artifactId("mina-core").version("2.0.0"),
mavenBundle().groupId("org.apache.ftpserver").artifactId("ftpserver-core").version("1.0.5"),
mavenBundle().groupId("org.apache.ftpserver").artifactId("ftplet-api").version("1.0.5"),
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=1083702&r1=1083701&r2=1083702&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 Mon Mar 21 08:46:37 2011
@@ -19,6 +19,7 @@ package org.apache.camel.itest.osgi.groo
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -27,8 +28,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -52,13 +52,12 @@ public class GroovyTest extends OSGiInte
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-test", "camel-groovy"),
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=1083702&r1=1083701&r2=1083702&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 Mon Mar 21 08:46:37 2011
@@ -24,6 +24,7 @@ import org.apache.camel.component.hawtdb
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
import org.apache.camel.processor.aggregate.AggregationStrategy;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -32,8 +33,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -93,13 +93,12 @@ public class HawtDBAggregateRouteTest ex
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-hawtdb"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java Mon Mar 21 08:46:37 2011
@@ -22,6 +22,7 @@ import org.apache.camel.CamelExecutionEx
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -30,8 +31,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -107,13 +107,12 @@ public class HL7DataFormatTest extends O
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-hl7"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7MLLPCodecTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7MLLPCodecTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7MLLPCodecTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7MLLPCodecTest.java Mon Mar 21 08:46:37 2011
@@ -19,6 +19,7 @@ package org.apache.camel.itest.osgi.hl7;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -29,8 +30,7 @@ import org.springframework.osgi.context.
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.felix;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+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;
@@ -65,13 +65,12 @@ public class HL7MLLPCodecTest extends OS
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-mina", "camel-hl7"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java Mon Mar 21 08:46:37 2011
@@ -20,6 +20,7 @@ import org.apache.camel.builder.RouteBui
import org.apache.camel.component.jasypt.JasyptPropertiesParser;
import org.apache.camel.component.properties.PropertiesComponent;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -28,8 +29,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -68,13 +68,12 @@ public class JasyptTest extends OSGiInte
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-test", "camel-jasypt"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbDataFormatTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbDataFormatTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbDataFormatTest.java Mon Mar 21 08:46:37 2011
@@ -20,6 +20,7 @@ import org.apache.camel.builder.RouteBui
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.converter.jaxb.JaxbDataFormat;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -28,8 +29,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -61,13 +61,12 @@ public class JaxbDataFormatTest extends
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterSpringTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterSpringTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterSpringTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterSpringTest.java Mon Mar 21 08:46:37 2011
@@ -18,6 +18,7 @@ package org.apache.camel.itest.osgi.jaxb
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -27,8 +28,7 @@ import org.springframework.osgi.context.
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -56,14 +56,12 @@ public class JaxbFallbackConverterSpring
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-jaxb"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java Mon Mar 21 08:46:37 2011
@@ -19,6 +19,7 @@ package org.apache.camel.itest.osgi.jaxb
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -27,8 +28,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -59,14 +59,12 @@ public class JaxbFallbackConverterTest e
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-jaxb"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jetty/OSGiMulitJettyCamelContextsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jetty/OSGiMulitJettyCamelContextsTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jetty/OSGiMulitJettyCamelContextsTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jetty/OSGiMulitJettyCamelContextsTest.java Mon Mar 21 08:46:37 2011
@@ -18,6 +18,7 @@ package org.apache.camel.itest.osgi.jett
import org.apache.camel.CamelExecutionException;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,9 +29,9 @@ 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.provision;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+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;
@@ -65,16 +66,13 @@ public class OSGiMulitJettyCamelContexts
response = template.requestBody(endpointURI, "Hello World", String.class);
assertEquals("response is " , "camelContext2", response);
}
-
@Configuration
public static Option[] configure() throws Exception {
-
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-jetty"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java Mon Mar 21 08:46:37 2011
@@ -17,6 +17,7 @@
package org.apache.camel.itest.osgi.jms;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -26,8 +27,7 @@ import org.springframework.osgi.context.
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -52,14 +52,13 @@ public class JmsTest extends OSGiIntegra
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
+
// using the features to install AMQ
scanFeatures("mvn:org.apache.activemq/activemq-karaf/5.4.0/xml/features", "activemq"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java Mon Mar 21 08:46:37 2011
@@ -22,6 +22,7 @@ import org.apache.camel.CamelContext;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
import org.apache.camel.spring.SpringCamelContext;
+import org.apache.karaf.testing.Helper;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
@@ -42,8 +43,7 @@ import org.springframework.transaction.s
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.felix;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+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;
@@ -127,31 +127,16 @@ public class JpaRouteTest extends OSGiIn
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
- //org.ops4j.pax.exam.CoreOptions.systemProperty("org.apache.servicemix.specs.debug").value("true"),
- //mavenBundle().groupId("net.sourceforge.serp").artifactId("com.springsource.serp").version("1.13.1"),
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-jpa"),
-
- /* This the camel-jpa needed bundles
- mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.java-persistence-api-1.1.1").version("1.4-SNAPSHOT"),
- mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.openjpa").version("1.2.1_1-SNAPSHOT"),
- mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-jta_1.1_spec").version("1.1.1"),
- mavenBundle().groupId("org.apache.camel").artifactId("camel-jpa").version("2.1-SNAPSHOT"),
- mavenBundle().groupId("org.springframework").artifactId("spring-jdbc").version("2.5.6"),
- mavenBundle().groupId("org.springframework").artifactId("spring-tx").version("2.5.6"),
- mavenBundle().groupId("org.springframework").artifactId("spring-orm").version("2.5.6"),
- mavenBundle().groupId("commons-lang").artifactId("commons-lang").version("2.4"),
- mavenBundle().groupId("commons-collections").artifactId("commons-collections").version("3.2.1"),
- mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.ant").version("1.7.0_1"),
- mavenBundle().groupId("commons-pool").artifactId("commons-pool").version("1.4"),
- mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-jms_1.1_spec").version("1.1.1"),*/
+
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"),
workingDirectory("target/paxrunner/"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mail/MailRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mail/MailRouteTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mail/MailRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mail/MailRouteTest.java Mon Mar 21 08:46:37 2011
@@ -29,6 +29,7 @@ import org.apache.camel.builder.RouteBui
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.converter.IOConverter;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.jvnet.mock_javamail.Mailbox;
@@ -38,8 +39,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+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;
@@ -119,13 +119,12 @@ public class MailRouteTest extends OSGiI
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mina/MinaTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mina/MinaTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mina/MinaTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mina/MinaTest.java Mon Mar 21 08:46:37 2011
@@ -18,6 +18,7 @@ package org.apache.camel.itest.osgi.mina
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -26,8 +27,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -55,13 +55,12 @@ public class MinaTest extends OSGiIntegr
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-test", "camel-mina"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mybatis/MyBatisTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mybatis/MyBatisTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mybatis/MyBatisTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/mybatis/MyBatisTest.java Mon Mar 21 08:46:37 2011
@@ -24,6 +24,7 @@ import org.apache.camel.builder.RouteBui
import org.apache.camel.component.mybatis.MyBatisComponent;
import org.apache.camel.component.mybatis.MyBatisEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -34,8 +35,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.felix;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+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;
@@ -105,14 +105,13 @@ public class MyBatisTest extends OSGiInt
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
+
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"),
// using the features to install the camel components
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/netty/NettyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/netty/NettyTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/netty/NettyTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/netty/NettyTest.java Mon Mar 21 08:46:37 2011
@@ -18,6 +18,7 @@ package org.apache.camel.itest.osgi.nett
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -26,8 +27,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -55,13 +55,12 @@ public class NettyTest extends OSGiInteg
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-test", "camel-netty"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java Mon Mar 21 08:46:37 2011
@@ -23,6 +23,7 @@ import org.apache.camel.component.mock.M
import org.apache.camel.dataformat.protobuf.ProtobufDataFormat;
import org.apache.camel.dataformat.protobuf.generated.AddressBookProtos;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -31,8 +32,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -109,13 +109,12 @@ public class ProtobufRouteTest extends O
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-protobuf"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/quartz/QuartzCronRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/quartz/QuartzCronRouteTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/quartz/QuartzCronRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/quartz/QuartzCronRouteTest.java Mon Mar 21 08:46:37 2011
@@ -19,6 +19,7 @@ package org.apache.camel.itest.osgi.quar
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -27,8 +28,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -54,13 +54,12 @@ public class QuartzCronRouteTest extends
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-quartz"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/RestletTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/RestletTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/RestletTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/RestletTest.java Mon Mar 21 08:46:37 2011
@@ -23,6 +23,7 @@ import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -31,8 +32,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -65,13 +65,12 @@ public class RestletTest extends OSGiInt
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-restlet"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java Mon Mar 21 08:46:37 2011
@@ -18,6 +18,7 @@ package org.apache.camel.itest.osgi.rest
import org.apache.camel.Exchange;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +29,7 @@ import org.springframework.osgi.context.
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -67,14 +67,12 @@ public class RestletDomainServiceTest ex
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-cxf", "camel-restlet"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/rss/RssPollingConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/rss/RssPollingConsumerTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/rss/RssPollingConsumerTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/rss/RssPollingConsumerTest.java Mon Mar 21 08:46:37 2011
@@ -26,6 +26,7 @@ import org.apache.camel.builder.RouteBui
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.rss.RssConstants;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -34,8 +35,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -76,13 +76,12 @@ public class RssPollingConsumerTest exte
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-rss"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/script/RubyOsgiTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/script/RubyOsgiTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/script/RubyOsgiTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/script/RubyOsgiTest.java Mon Mar 21 08:46:37 2011
@@ -19,6 +19,7 @@ package org.apache.camel.itest.osgi.scri
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -27,8 +28,7 @@ import org.ops4j.pax.exam.junit.Configur
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -57,14 +57,12 @@ public class RubyOsgiTest extends OSGiIn
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
- // this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
+ // this is how you set the default log level when using pax logging (logProfile)
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-script", "camel-ruby"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java Mon Mar 21 08:46:37 2011
@@ -17,6 +17,7 @@
package org.apache.camel.itest.osgi.servlet;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -26,8 +27,7 @@ import org.springframework.osgi.context.
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -44,19 +44,16 @@ public class ServletComponentTest extend
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
- profile("compendium"),
- profile("web"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
+ // this is how you set the default log level when using pax logging (logProfile)
+ Helper.setLogLevel("WARN")),
+ Helper.loadKarafStandardFeatures("http", "war"),
// set the system property for pax web
org.ops4j.pax.exam.CoreOptions.systemProperty("org.osgi.service.http.port").value("9080"),
- // this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-http", "camel-servlet"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletServicesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletServicesTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletServicesTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletServicesTest.java Mon Mar 21 08:46:37 2011
@@ -17,6 +17,7 @@
package org.apache.camel.itest.osgi.servlet;
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.CoreOptions;
@@ -27,8 +28,7 @@ import org.springframework.osgi.context.
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -43,20 +43,16 @@ public class ServletServicesTest extends
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
- CoreOptions.mavenBundle("org.apache.felix", "org.apache.felix.fileinstall", "3.0.2"),
- // need to install some karaf features
- scanFeatures(getKarafFeatureUrl(), "http", "war"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
+ // this is how you set the default log level when using pax logging (logProfile)
+ Helper.setLogLevel("WARN")),
+ Helper.loadKarafStandardFeatures("http", "war"),
// set the system property for pax web
org.ops4j.pax.exam.CoreOptions.systemProperty("org.osgi.service.http.port").value("9080"),
-
- // this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-
+
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-blueprint", "camel-spring", "camel-test", "camel-http", "camel-servlet"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/shiro/ShiroAuthenticationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/shiro/ShiroAuthenticationTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/shiro/ShiroAuthenticationTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/shiro/ShiroAuthenticationTest.java Mon Mar 21 08:46:37 2011
@@ -26,6 +26,7 @@ import org.apache.camel.component.shiro.
import org.apache.camel.component.shiro.security.ShiroSecurityToken;
import org.apache.camel.component.shiro.security.ShiroSecurityTokenInjector;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.LockedAccountException;
import org.apache.shiro.authc.UnknownAccountException;
@@ -37,8 +38,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -88,13 +88,12 @@ public class ShiroAuthenticationTest ext
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-shiro"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/bean/SpringBeanRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/bean/SpringBeanRouteTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/bean/SpringBeanRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/bean/SpringBeanRouteTest.java Mon Mar 21 08:46:37 2011
@@ -19,18 +19,9 @@ package org.apache.camel.itest.osgi.spri
import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
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.JUnit4TestRunner;
import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
-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.container.def.PaxRunnerOptions.profile;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
-
@RunWith(JUnit4TestRunner.class)
public class SpringBeanRouteTest extends OSGiIntegrationSpringTestSupport {
@@ -48,22 +39,4 @@ public class SpringBeanRouteTest extends
return new OsgiBundleXmlApplicationContext(new String[]{"org/apache/camel/itest/osgi/spring/bean/CamelContext.xml"});
}
- @Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
- // this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
- // using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-core", "camel-spring", "camel-test"),
-
- workingDirectory("target/paxrunner/"),
-
- felix(), equinox());
-
- return options;
- }
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java Mon Mar 21 08:46:37 2011
@@ -21,20 +21,8 @@ import org.apache.camel.component.mock.M
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
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.JUnit4TestRunner;
-import org.ops4j.pax.exam.options.UrlReference;
-import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.felix;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemPackage;
-
-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;
@RunWith(JUnit4TestRunner.class)
@@ -64,32 +52,6 @@ public class XsltRouteTest extends OSGiI
};
}
- @Configuration
- public static Option[] configure() throws Exception {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
- // setup the boot delegation of sun's package
- //bootDelegationPackage("com.sun.org.apache.xml.internal.*"),
- systemPackage("com.sun.org.apache.xalan.internal.xsltc"),
- systemPackage("com.sun.org.apache.xml.internal.dtm"),
-
- // this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
- // need to install some karaf features
- scanFeatures(getKarafFeatureUrl(), "http"),
-
- // using the features to install the camel components
- scanFeatures(getCamelKarafFeatureUrl(),
- "camel-core", "camel-spring", "camel-test"),
-
- workingDirectory("target/paxrunner/"),
-
- equinox(),
- felix());
-
- return options;
- }
+
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/stream/StreamTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/stream/StreamTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/stream/StreamTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/stream/StreamTest.java Mon Mar 21 08:46:37 2011
@@ -18,6 +18,7 @@ package org.apache.camel.itest.osgi.stre
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -26,8 +27,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -54,13 +54,12 @@ public class StreamTest extends OSGiInte
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-test", "camel-stream"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/syslog/SyslogTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/syslog/SyslogTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/syslog/SyslogTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/syslog/SyslogTest.java Mon Mar 21 08:46:37 2011
@@ -30,6 +30,7 @@ import org.apache.camel.component.syslog
import org.apache.camel.component.syslog.SyslogMessage;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
import org.apache.camel.spi.DataFormat;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -39,8 +40,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -100,14 +100,12 @@ public class SyslogTest extends OSGiInte
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
-
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(), "camel-core", "camel-test", "camel-mina", "camel-syslog"),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityTest.java?rev=1083702&r1=1083701&r2=1083702&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityTest.java Mon Mar 21 08:46:37 2011
@@ -22,6 +22,7 @@ import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
+import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
@@ -30,8 +31,7 @@ import org.ops4j.pax.exam.junit.JUnit4Te
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.container.def.PaxRunnerOptions.profile;
+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;
@@ -65,13 +65,12 @@ public class VelocityTest extends OSGiIn
}
@Configuration
- public static Option[] configure() {
- Option[] options = options(
- // install the spring dm profile
- profile("spring.dm").version("1.2.0"),
+ public static Option[] configure() throws Exception {
+ Option[] options = combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-
+ Helper.setLogLevel("WARN")),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
"camel-core", "camel-spring", "camel-test", "camel-velocity"),