camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1203648 - in /camel/trunk/tests/camel-itest-osgi: ./ src/test/java/org/apache/camel/itest/osgi/ src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/ src/test/java/org/apache/camel/itest/osgi/jpa/ src/test/java/org/apache/camel/itest/os...
Date Fri, 18 Nov 2011 13:40:09 GMT
Author: ningjiang
Date: Fri Nov 18 13:40:09 2011
New Revision: 1203648

URL: http://svn.apache.org/viewvc?rev=1203648&view=rev
Log:
Fixed the OSGi test failures

Modified:
    camel/trunk/tests/camel-itest-osgi/pom.xml
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaBlueprintRouteTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.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=1203648&r1=1203647&r2=1203648&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/pom.xml (original)
+++ camel/trunk/tests/camel-itest-osgi/pom.xml Fri Nov 18 13:40:09 2011
@@ -294,6 +294,16 @@
     <dependency>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.configadmin</artifactId>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>javax.servlet</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.foundation</artifactId>
+          </exclusion>
+        </exclusions>
         <scope>test</scope>
     </dependency>
     <dependency>

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java?rev=1203648&r1=1203647&r2=1203648&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
Fri Nov 18 13:40:09 2011
@@ -101,7 +101,7 @@ public class OSGiIntegrationTestSupport 
         return mavenBundle().groupId("org.apache.karaf.assemblies.features").
             artifactId("enterprise").version(karafVersion).type(type);
     }
-    
+
     private static URL getResource(String location) {
         URL url = null;
         if (Thread.currentThread().getContextClassLoader() != null) {
@@ -129,9 +129,12 @@ public class OSGiIntegrationTestSupport 
             // install the spring, http features first
             scanFeatures(getKarafFeatureUrl(), "spring", "spring-dm", "jetty"),
 
+            // install the cxf jaxb spec as the karaf doesn't provide it by default
+            scanFeatures(getCamelKarafFeatureUrl(), "cxf-jaxb"),
+
             // using the features to install the camel components             
             scanFeatures(getCamelKarafFeatureUrl(),                         
-                "xml-specs-api", "camel-core", "camel-spring", "camel-test"),
+                "camel-core", "camel-spring", "camel-test"),
                                    
             workingDirectory("target/paxrunner/"));
 

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java?rev=1203648&r1=1203647&r2=1203648&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBeanBlueprintRouterTest.java
Fri Nov 18 13:40:09 2011
@@ -30,8 +30,10 @@ import org.ops4j.pax.exam.junit.Configur
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Constants;
 
+import static org.ops4j.pax.exam.CoreOptions.equinox;
 import static org.ops4j.pax.exam.OptionUtils.combine;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
 import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
 
 @RunWith(JUnit4TestRunner.class)
@@ -39,7 +41,7 @@ public class CxfBeanBlueprintRouterTest 
 
     protected void doPostSetup() throws Exception {
         getInstalledBundle("CxfBeanBlueprintRouterTest").start();
-        getOsgiService(CamelContext.class, "(camel.context.symbolicname=CxfBeanBlueprintRouterTest)",
10000);
+        getOsgiService(CamelContext.class, "(camel.context.symbolicname=CxfBeanBlueprintRouterTest)",
20000);
     }
 
     @Test
@@ -93,7 +95,8 @@ public class CxfBeanBlueprintRouterTest 
                 .add(org.apache.camel.itest.osgi.cxf.jaxrs.testbean.Product.class)
                 .set(Constants.BUNDLE_SYMBOLICNAME, "CxfBeanBlueprintRouterTest")
                 .set(Constants.DYNAMICIMPORT_PACKAGE, "*")
-                .build()).noStart()//,
+                .build()).noStart()
+            //equinox()//,
             //vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006")
 
         );

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java?rev=1203648&r1=1203647&r2=1203648&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfBlueprintRouterTest.java
Fri Nov 18 13:40:09 2011
@@ -61,7 +61,7 @@ public class CxfBlueprintRouterTest exte
 
     protected void doPostSetup() throws Exception {
         getInstalledBundle("CxfBlueprintRouterTest").start();
-        getOsgiService(CamelContext.class, "(camel.context.symbolicname=CxfBlueprintRouterTest)",
10000);
+        getOsgiService(CamelContext.class, "(camel.context.symbolicname=CxfBlueprintRouterTest)",
20000);
     }
 
     protected static ReportIncidentEndpoint createCXFClient() {

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java?rev=1203648&r1=1203647&r2=1203648&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/cxf/blueprint/CxfRsBlueprintRouterTest.java
Fri Nov 18 13:40:09 2011
@@ -67,7 +67,7 @@ public class CxfRsBlueprintRouterTest ex
 
     protected void doPostSetup() throws Exception {
         getInstalledBundle("CxfRsBlueprintRouterTest").start();
-        getOsgiService(CamelContext.class, "(camel.context.symbolicname=CxfRsBlueprintRouterTest)",
10000);
+        getOsgiService(CamelContext.class, "(camel.context.symbolicname=CxfRsBlueprintRouterTest)",
30000);
     }
 
     @Test

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaBlueprintRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaBlueprintRouteTest.java?rev=1203648&r1=1203647&r2=1203648&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaBlueprintRouteTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaBlueprintRouteTest.java
Fri Nov 18 13:40:09 2011
@@ -32,8 +32,8 @@ import org.ops4j.pax.exam.junit.JUnit4Te
 import org.osgi.framework.Constants;
 import org.osgi.service.blueprint.container.BlueprintContainer;
 
-import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.felix;
+//import static org.ops4j.pax.exam.CoreOptions.equinox;
+//import static org.ops4j.pax.exam.CoreOptions.felix;
 import static org.ops4j.pax.exam.OptionUtils.combine;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
 import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.modifyBundle;
@@ -45,7 +45,7 @@ public class JpaBlueprintRouteTest exten
     @Test
     public void testBlueprintRouteJpa() throws Exception {
         getInstalledBundle("CamelBlueprintJpaTestBundle").start();
-        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintJpaTestBundle)",
20000);
+        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintJpaTestBundle)",
30000);
         CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintJpaTestBundle)",
20000);
 
         MockEndpoint mock = (MockEndpoint) ctx.getEndpoint("mock:result");
@@ -76,13 +76,12 @@ public class JpaBlueprintRouteTest exten
                                 .build();
                     }
                 },
-                scanFeatures(getKarafFeatureUrl(), "spring"),
                 scanFeatures(getKarafEnterpriseFeatureUrl(), "jndi", "jpa", "transaction"),
                 mavenBundle("org.apache.derby", "derby", "10.4.2.0"),
                 // using the features to install the camel components
                 scanFeatures(getCamelKarafFeatureUrl(),
-                        "camel-blueprint", "camel-jpa"),
-                felix(), equinox());
+                        "camel-blueprint", "camel-jpa"));
+                //felix(), equinox());
 
         return options;
     }

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=1203648&r1=1203647&r2=1203648&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
Fri Nov 18 13:40:09 2011
@@ -55,8 +55,8 @@ public class KratiBlueprintRouteTest ext
     @Test
     public void testProducerConsumerAndIdempotent() throws Exception {
         getInstalledBundle("CamelBlueprintKratiTestBundle").start();
-        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintKratiTestBundle)",
10000);
-        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintKratiTestBundle)",
10000);
+        BlueprintContainer ctn = getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=CamelBlueprintKratiTestBundle)",
20000);
+        CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintKratiTestBundle)",
20000);
         MockEndpoint mock = (MockEndpoint) ctx.getEndpoint("mock:results");
         ProducerTemplate template = ctx.createProducerTemplate();
         mock.expectedMessageCount(2);
@@ -72,7 +72,7 @@ public class KratiBlueprintRouteTest ext
                 // Default karaf environment
                 Helper.getDefaultOptions(
                         // this is how you set the default log level when using pax logging
(logProfile)
-                        Helper.setLogLevel("INFO")),
+                        Helper.setLogLevel("WARN")),
                 new Customizer() {
                     @Override
                     public InputStream customizeTestProbe(InputStream testProbe) {
@@ -89,7 +89,7 @@ public class KratiBlueprintRouteTest ext
                 scanFeatures(getKarafFeatureUrl(), "spring"),
                 // using the features to install the camel components
                 scanFeatures(getCamelKarafFeatureUrl(),
-                        "camel-core", "camel-blueprint", "camel-test", "camel-krati"),
+                         "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"),



Mime
View raw message