Author: davsclaus
Date: Thu Dec 22 14:49:43 2011
New Revision: 1222267

URL: http://svn.apache.org/viewvc?rev=1222267&view=rev
Log:
OSGi tests should use the default karaf options from the base test class

Modified:
    
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/ftp/FtpTest.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/jclouds/BlobStoreRouteTest.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/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/mail/MailRouteTest.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/sql/SqlRouteTest.java

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=1222267&r1=1222266&r2=1222267&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
 Thu Dec 22 14:49:43 2011
@@ -66,24 +66,14 @@ public class CacheReplicationTest extend
     @Configuration
     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")),
-                    
-                    // install the spring, http features first
-                    scanFeatures(getKarafFeatureUrl(), "spring", "spring-dm", 
"jetty"),
+                // Default karaf environment
+                getDefaultCamelKarafOptions(),
+                // using the features to install the camel components
+                scanFeatures(getCamelKarafFeatureUrl(), "jetty", "camel-jms", 
"camel-cache"),
 
-                    // using the features to install AMQ
-                    
scanFeatures("mvn:org.apache.activemq/activemq-karaf/5.5.0/xml/features",
-                            "activemq"),
-
-                    // using the features to install the camel components
-                    scanFeatures(getCamelKarafFeatureUrl(),
-                            "camel-core", "camel-spring", "camel-test", 
"camel-jms", "camel-cache"),
-
-                workingDirectory("target/paxrunner/"),
+                // using the features to install AMQ
+                
scanFeatures("mvn:org.apache.activemq/activemq-karaf/5.5.0/xml/features",
+                        "activemq"),
 
                 felix());
 

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=1222267&r1=1222266&r2=1222267&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
 Thu Dec 22 14:49:43 2011
@@ -18,7 +18,6 @@ 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;
@@ -31,7 +30,6 @@ import static org.ops4j.pax.exam.CoreOpt
 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;
-import static 
org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
 
 @RunWith(JUnit4TestRunner.class)
 @Ignore("Not fully implemented, see TODO")
@@ -53,25 +51,15 @@ public class FtpTest extends OSGiIntegra
     @Configuration
     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")),
-                
-            
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"),
 
-            // install the spring, http features first
-            scanFeatures(getKarafFeatureUrl(), "spring", "spring-dm", "jetty"),
-            
+            getDefaultCamelKarafOptions(),
             // using the features to install the camel components
-            scanFeatures(getCamelKarafFeatureUrl(),                         
-                          "camel-core", "camel-spring", "camel-test", 
"camel-ftp"),
-
-            // TODO: our app need to import the FTP server stuff
+            scanFeatures(getCamelKarafFeatureUrl(), "jetty", "camel-ftp"),
 
-            workingDirectory("target/paxrunner/"),
+            // ftp server bundles
+            
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"),
 
             /*felix(),*/ equinox());
         

Modified: 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsRouteTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsRouteTest.java?rev=1222267&r1=1222266&r2=1222267&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsRouteTest.java
 (original)
+++ 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hdfs/HdfsRouteTest.java
 Thu Dec 22 14:49:43 2011
@@ -83,10 +83,11 @@ public class HdfsRouteTest extends OSGiI
     @Configuration
     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")),
+
+                getDefaultCamelKarafOptions(),
+                // using the features to install the camel components
+                scanFeatures(getCamelKarafFeatureUrl(), "camel-hdfs"),
+
                 new Customizer() {
                     @Override
                     public InputStream customizeTestProbe(InputStream 
testProbe) {
@@ -98,16 +99,7 @@ public class HdfsRouteTest extends OSGiI
                                 .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
                                 .build();
                     }
-                },
-
-                // install the spring.
-                scanFeatures(getKarafFeatureUrl(), "spring"),
-                // using the features to install the camel components
-                scanFeatures(getCamelKarafFeatureUrl(),
-                        "camel-core", "camel-spring", "camel-test", 
"camel-hdfs"),
-                workingDirectory("target/paxrunner/"),
-                //vmOption("-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-                felix(), equinox());
+                });
 
         return options;
     }

Modified: 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java?rev=1222267&r1=1222266&r2=1222267&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
 (original)
+++ 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
 Thu Dec 22 14:49:43 2011
@@ -90,19 +90,9 @@ public class BlobStoreRouteTest extends 
     @Configuration
     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")),
-
-                // install the spring.
-                scanFeatures(getKarafFeatureUrl(), "spring"),
+                getDefaultCamelKarafOptions(),
                 // using the features to install the camel components
-                scanFeatures(getCamelKarafFeatureUrl(),
-                        "camel-core", "camel-spring", "camel-test", 
"camel-jclouds"),
-                workingDirectory("target/paxrunner/"),
-                //vmOption("-Xdebug -Xnoagent -Djava.compiler=NONE 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-                felix(), equinox());
+                scanFeatures(getCamelKarafFeatureUrl(), "camel-jclouds"));
 
         return options;
     }

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=1222267&r1=1222266&r2=1222267&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
 Thu Dec 22 14:49:43 2011
@@ -135,22 +135,14 @@ public class JpaRouteTest extends OSGiIn
     @Configuration
     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")),
-                
-            // install the spring.
-            scanFeatures(getKarafFeatureUrl(), "spring"),
-            // using the features to install the camel components             
-            scanFeatures(getCamelKarafFeatureUrl(),                         
-                          "camel-core", "camel-spring", "camel-test", 
"camel-jpa"),
-            
-            
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"),
-            workingDirectory("target/paxrunner/"),
 
-            felix(), equinox());
-        
+            getDefaultCamelKarafOptions(),
+            // using the features to install the camel components
+            scanFeatures(getCamelKarafFeatureUrl(), "camel-jpa"),
+
+            // use derby as the database
+            
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"));
+
         return options;
     }
 }
\ No newline at end of file

Modified: 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java?rev=1222267&r1=1222266&r2=1222267&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java
 (original)
+++ 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java
 Thu Dec 22 14:49:43 2011
@@ -69,10 +69,11 @@ public class KratiBlueprintRouteTest ext
     @Configuration
     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")),
+
+                getDefaultCamelKarafOptions(),
+                // using the features to install the camel components
+                scanFeatures(getCamelKarafFeatureUrl(), "camel-blueprint", 
"camel-krati"),
+
                 new Customizer() {
                     @Override
                     public InputStream customizeTestProbe(InputStream 
testProbe) {
@@ -84,16 +85,7 @@ public class KratiBlueprintRouteTest ext
                                 .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
                                 .build();
                     }
-                },
-                // install the spring.
-                scanFeatures(getKarafFeatureUrl(), "spring"),
-                // using the features to install the camel components
-                scanFeatures(getCamelKarafFeatureUrl(),
-                         "camel-core", "camel-blueprint", "camel-test", 
"camel-krati"),
-
-                workingDirectory("target/paxrunner/"),
-                //vmOption("-Xdebug -Xnoagent -Djava.compiler=NONE 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-                felix(), equinox());
+                });
 
         return options;
     }

Modified: 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiRouteTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiRouteTest.java?rev=1222267&r1=1222266&r2=1222267&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiRouteTest.java
 (original)
+++ 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiRouteTest.java
 Thu Dec 22 14:49:43 2011
@@ -71,20 +71,9 @@ public class KratiRouteTest extends OSGi
     @Configuration
     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")),
-
-                // install the spring.
-                scanFeatures(getKarafFeatureUrl(), "spring"),
+                getDefaultCamelKarafOptions(),
                 // using the features to install the camel components
-                scanFeatures(getCamelKarafFeatureUrl(),
-                        "camel-core", "camel-spring", "camel-test", 
"camel-krati"),
-
-                workingDirectory("target/paxrunner/"),
-                //vmOption("-Xdebug -Xnoagent -Djava.compiler=NONE 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-                felix(), equinox());
+                scanFeatures(getCamelKarafFeatureUrl(), "camel-krati"));
 
         return options;
     }

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=1222267&r1=1222266&r2=1222267&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
 Thu Dec 22 14:49:43 2011
@@ -123,17 +123,11 @@ public class MailRouteTest extends OSGiI
     @Configuration
     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")),
-            // install the spring, http features first
-            scanFeatures(getKarafFeatureUrl(), "spring", "spring-dm", "jetty"),
-                
-            // using the features to install the camel components             
-            scanFeatures(getCamelKarafFeatureUrl(),                         
-                          "camel-core", "camel-spring", "camel-test"),
-            
+
+            getDefaultCamelKarafOptions(),
+            // using the features to install the camel components
+            scanFeatures(getCamelKarafFeatureUrl(), "jetty"),
+
             // using the java mail API bundle
             
mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.javamail-api-1.4").version("1.3.0"),
                           
@@ -141,7 +135,7 @@ public class MailRouteTest extends OSGiI
             
             // Added the mock_java_mail bundle for testing
             // just using the mock_java_mail version for testing
-            
mavenBundle().groupId("org.apache.camel.tests").artifactId("org.apache.camel.tests.mock-javamail_1.7").version("2.4.0"),
+            
mavenBundle().groupId("org.apache.camel.tests").artifactId("org.apache.camel.tests.mock-javamail_1.7").version("2.8.3"),
             
             workingDirectory("target/paxrunner/"),
 

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=1222267&r1=1222266&r2=1222267&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
 Thu Dec 22 14:49:43 2011
@@ -107,23 +107,13 @@ public class MyBatisTest extends OSGiInt
     @Configuration
     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")),
-                
-            // install the spring, http features first
-            scanFeatures(getKarafFeatureUrl(), "spring", "spring-dm", "jetty"),
-                
-            
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"),
 
+            getDefaultCamelKarafOptions(),
             // using the features to install the camel components
-            scanFeatures(getCamelKarafFeatureUrl(),
-                          "camel-core", "camel-test", "camel-mybatis"),
+            scanFeatures(getCamelKarafFeatureUrl(), "jetty", "camel-mybatis"),
 
-            workingDirectory("target/paxrunner/"),
-
-            felix(), equinox());
+            // use derby as the database
+            
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"));
 
         return options;
     }

Modified: 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/sql/SqlRouteTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/sql/SqlRouteTest.java?rev=1222267&r1=1222266&r2=1222267&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/sql/SqlRouteTest.java
 (original)
+++ 
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/sql/SqlRouteTest.java
 Thu Dec 22 14:49:43 2011
@@ -144,21 +144,12 @@ public class SqlRouteTest extends OSGiIn
     @Configuration
     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")),
-
-                // install the spring.
-                scanFeatures(getKarafFeatureUrl(), "spring"),
+                getDefaultCamelKarafOptions(),
                 // using the features to install the camel components
-                scanFeatures(getCamelKarafFeatureUrl(),
-                        "camel-core", "camel-spring", "camel-test", 
"camel-sql"),
-
-                
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"),
-                workingDirectory("target/paxrunner/"),
+                scanFeatures(getCamelKarafFeatureUrl(), "camel-sql"),
 
-                felix(), equinox());
+                // and use derby as the database
+                
mavenBundle().groupId("org.apache.derby").artifactId("derby").version("10.4.2.0"));
 
         return options;
     }


Reply via email to