camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r769393 - in /camel/trunk/tests/camel-itest-osgi: pom.xml src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTest.java
Date Tue, 28 Apr 2009 13:34:23 GMT
Author: ningjiang
Date: Tue Apr 28 13:34:22 2009
New Revision: 769393

URL: http://svn.apache.org/viewvc?rev=769393&view=rev
Log:
CAMEL-1571 Used the Camel features in Camel OSGi integration test

Modified:
    camel/trunk/tests/camel-itest-osgi/pom.xml
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTest.java

Modified: camel/trunk/tests/camel-itest-osgi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/pom.xml?rev=769393&r1=769392&r2=769393&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/pom.xml (original)
+++ camel/trunk/tests/camel-itest-osgi/pom.xml Tue Apr 28 13:34:22 2009
@@ -97,8 +97,13 @@
       <version>4.0.1</version>
       <scope>test</scope>
     </dependency>
-
-
+    <dependency>
+      <groupId>org.apache.camel.karaf</groupId>
+      <artifactId>features</artifactId>
+      <version>${version}</version>
+      <type>pom</type>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-osgi</artifactId>

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTest.java?rev=769393&r1=769392&r2=769393&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTest.java
Tue Apr 28 13:34:22 2009
@@ -39,8 +39,8 @@
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.mavenConfiguration;
 import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
 import static org.ops4j.pax.exam.MavenUtils.asInProject;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.logProfile;
 /**
@@ -56,11 +56,7 @@
     @Test
     public void listBundles() throws Exception {
         LOG.info("************ Hello from OSGi ************");
-
-        for (Bundle b : bundleContext.getBundles()) {
-            LOG.info("Bundle " + b.getBundleId() + " : " + b.getSymbolicName());
-        }
-
+       
         // TODO we should be using Camel OSGi really to deal with class loader issues
         CamelContext camelContext = new DefaultCamelContext();
 
@@ -90,20 +86,19 @@
             logProfile(),
     
             // this is how you set the default log level when using pax logging (logProfile)
-            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-    
-            // lets deploy the bundles we need
-            mavenBundle().groupId("org.apache.camel").artifactId("camel-core").versionAsInProject(),
+            systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
             
-            //scanFeatures("mvn:org.apache.camel.karaf/features/2.0-SNAPSHOT/xml/features",
-            //              "camel-core"),
+            // using the features to install the camel components             
+            scanFeatures(mavenBundle().groupId("org.apache.camel.karaf").
+                         artifactId("features").versionAsInProject().type("xml/features"),
                        
+                          "camel-core"),
                
             
             knopflerfish(), felix(), equinox());
 
         // use config generated by the Maven plugin (until PAXEXAM-62/64 get resolved)
         if (OSGiIntegrationTest.class.getClassLoader().getResource("META-INF/maven/paxexam-config.args")
!= null) {
-           options = OptionUtils.combine(options, mavenConfiguration());
+            options = OptionUtils.combine(options, mavenConfiguration());
         }
         
         return options;



Mime
View raw message