camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1406486 - in /camel/trunk: parent/ tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/ tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/ tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osg...
Date Wed, 07 Nov 2012 08:04:33 GMT
Author: davsclaus
Date: Wed Nov  7 08:04:32 2012
New Revision: 1406486

URL: http://svn.apache.org/viewvc?rev=1406486&view=rev
Log:
CAMEL-5745: Fixed osgi tests to work with Karaf 2.3.0

Removed:
    camel/trunk/tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/custom.properties
    camel/trunk/tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/jre.properties
    camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/karaf/custom.properties
    camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/karaf/jre.properties
Modified:
    camel/trunk/parent/pom.xml
    camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
    camel/trunk/tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/config.properties
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
    camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/karaf/config.properties

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1406486&r1=1406485&r2=1406486&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Wed Nov  7 08:04:32 2012
@@ -256,7 +256,7 @@
     <oscache-bundle-version>2.4_5</oscache-bundle-version>
     <osgi-version>4.3.0</osgi-version>
     <paranamer-bundle-version>2.4_1</paranamer-bundle-version>
-    <pax-exam-version>2.5.0</pax-exam-version>
+    <pax-exam-version>2.6.0</pax-exam-version>
     <paxexam-karaf-container-version>1.0.0</paxexam-karaf-container-version>
     <pax-runner-version>1.6.1</pax-runner-version>
     <pax-tiny-bundle-version>1.3.1</pax-tiny-bundle-version>

Modified: camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java?rev=1406486&r1=1406485&r2=1406486&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
(original)
+++ camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
Wed Nov  7 08:04:32 2012
@@ -40,11 +40,9 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.scanFeatures;
 
-
 public abstract class AbstractFeatureTest {
 
     private static final Logger LOG = LoggerFactory.getLogger(AbstractFeatureTest.class);
-    protected transient Logger log = LoggerFactory.getLogger(getClass());
 
     @Inject
     protected BundleContext bundleContext;
@@ -161,8 +159,8 @@ public abstract class AbstractFeatureTes
                     .unpackDirectory(new File("target/paxexam/unpack/")),
                 
                 KarafDistributionOption.keepRuntimeFolder(),
-                // override the jre.properties
-                replaceConfigurationFile("etc/jre.properties", new File("src/test/resources/org/apache/camel/itest/karaf/jre.properties")),
+                // override the config.properties (to fix pax-exam bug)
+                replaceConfigurationFile("etc/config.properties", new File("src/test/resources/org/apache/camel/itest/karaf/config.properties")),
                 // install the cxf jaxb spec as the karaf doesn't provide it by default
                 scanFeatures(getCamelKarafFeatureUrl(), "cxf-jaxb", "camel-core", "camel-spring",
"camel-" + feature)};
 

Modified: camel/trunk/tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/config.properties
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/config.properties?rev=1406486&r1=1406485&r2=1406486&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/config.properties
(original)
+++ camel/trunk/tests/camel-itest-karaf/src/test/resources/org/apache/camel/itest/karaf/config.properties
Wed Nov  7 08:04:32 2012
@@ -17,6 +17,8 @@
 #
 ################################################################################
 
+# FIXING PAX-EXAM BUG
+
 #
 # This file lists Karaf default settings for this particular version of Karaf.
 # For easier maintenance when upgrading Karaf and to better document which
@@ -29,41 +31,62 @@
 #
 # Properties file inclusions (as a space separated list of relative paths)
 # Included files will override the values specified in this file
+# NB: ${includes} properties files are mandatory, it means that Karaf will not start
+# if the include file is not found
 #
 ${includes} = jre.properties custom.properties
 
 #
+# Properties file inclusions (as a space separated list of relative paths)
+# Included files will override the values specified in this file
+# NB: ${optionals} properties files are optionals, it means that Karaf will just
+# display a warning message but the bootstrap will be performed
+#
+# ${optionals} = my.properties
+
+
+#
 # Framework selection properties
 #
-karaf.framework=equinox
+karaf.framework=felix
 
 #
 # Location of the OSGi frameworks
 #
-karaf.framework.equinox=${karaf.default.repository}/org/eclipse/osgi/3.6.0.v20100517/osgi-3.6.0.v20100517.jar
-karaf.framework.felix=${karaf.default.repository}/org/apache/felix/org.apache.felix.framework/3.0.9/org.apache.felix.framework-3.0.9.jar
+karaf.framework.equinox=${karaf.default.repository}/org/eclipse/osgi/3.8.0.v20120529-1548/osgi-3.8.0.v20120529-1548.jar
+karaf.framework.felix=${karaf.default.repository}/org/apache/felix/org.apache.felix.framework/4.0.3/org.apache.felix.framework-4.0.3.jar
 
 #
 # Framework config properties.
 #
-org.osgi.framework.system.packages=org.osgi.framework; version=1.5.0, \
- org.osgi.framework.launch; version=1.0.0, \
- org.osgi.framework.hooks.service; version=1.0.0, \
- org.osgi.service.packageadmin; version=1.2.0, \
- org.osgi.service.startlevel; version=1.1.0, \
- org.osgi.service.url; version=1.0.0, \
- org.osgi.util.tracker; version=1.4.0, \
- org.apache.karaf.jaas.boot; version=2.2.2, \
- org.apache.karaf.version; version=2.2.2, \
+org.osgi.framework.system.packages= \
+ org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0", \
+ org.osgi.framework.wiring;uses:="org.osgi.resource,org.osgi.framework";version="1.1", \
+ org.osgi.framework.hooks.bundle;uses:="org.osgi.framework";version="1.1", \
+ org.osgi.framework.hooks.service;uses:="org.osgi.framework";version="1.1", \
+ org.osgi.framework.hooks.resolver;uses:="org.osgi.framework.wiring";version="1.0", \
+ org.osgi.framework.launch;uses:="org.osgi.framework";version="1.1", \
+ org.osgi.framework.namespace;uses:="org.osgi.resource";version="1.0", \
+ org.osgi.framework;version="1.7",\
+ org.osgi.framework.hooks.weaving;uses:="org.osgi.framework.wiring";version="1.0",\
+ org.osgi.resource;version="1.0",org.osgi.service.url;version="1.0",\
+ org.osgi.service.startlevel;uses:="org.osgi.framework";version="1.1",\
+ org.osgi.service.packageadmin;uses:="org.osgi.framework";version="1.2",\
+ org.osgi.service.url;version="1.0", \
+ org.osgi.util.tracker;uses:="org.osgi.framework";version="1.5.1", \
+ org.apache.karaf.jaas.boot;version="2.3.0", \
+ org.apache.karaf.jaas.boot.principal;version="2.3.0", \
+ org.apache.karaf.version;version="2.3.0", \
  ${jre-${java.specification.version}}
 
-org.osgi.framework.system.packages.extra=
+# Extra packages appended after standard packages
+# org.osgi.framework.system.packages.extra=
 
-# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
 
+# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
 org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*
 
 # OSGi Execution Environment
-org.osgi.framework.executionenvironment=J2SE-1.5,J2SE-1.4,J2SE-1.3,J2SE-1.2
+org.osgi.framework.executionenvironment=J2SE-1.7,JavaSE-1.7,J2SE-1.6,JavaSE-1.6,J2SE-1.5,JavaSE-1.5,J2SE-1.4,JavaSE-1.4,J2SE-1.3,JavaSE-1.3,J2SE-1.2,,JavaSE-1.2,CDC-1.1/Foundation-1.1,CDC-1.0/Foundation-1.0,J2ME,OSGi/Minimum-1.1,OSGi/Minimum-1.0
 
 # Set the parent classloader for the bundle to the classloader that loads the Framework (i.e.
everything in lib/*.jar)
 org.osgi.framework.bundle.parent=framework
@@ -72,7 +95,7 @@ org.osgi.framework.bundle.parent=framewo
 karaf.auto.start=startup.properties
 
 org.osgi.framework.startlevel.beginning=100
-karaf.startlevel.bundle=60
+karaf.startlevel.bundle=80
 
 karaf.shutdown.port.file=${karaf.data}/port
 
@@ -83,6 +106,7 @@ felix.fileinstall.dir    = ${karaf.base}
 felix.fileinstall.filter = .*\\.cfg
 felix.fileinstall.poll   = 1000
 felix.fileinstall.noInitialDelay = true
+felix.fileinstall.log.level = 3
 
 #
 # Delay for writing the framework state to disk in equinox
@@ -92,7 +116,9 @@ eclipse.stateSaveDelayInterval = 1000
 
 #
 # OBR Repository list
-# This property will be modified by the obr:addUrl and obr:removeUrl commands. 
+# This property will be modified by the obr:addUrl and obr:removeUrl commands.
 #
-obr.repository.url = 
+obr.repository.url =
+
+karaf.delay.console=false
 

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=1406486&r1=1406485&r2=1406486&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
Wed Nov  7 08:04:32 2012
@@ -136,14 +136,10 @@ public class OSGiIntegrationTestSupport 
                           .useDeployFolder(false).unpackDirectory(new File("target/paxexam/unpack/")),
 
                       KarafDistributionOption.keepRuntimeFolder(),
-                      // override the jre.properties
-                      replaceConfigurationFile("etc/jre.properties",
-                                               new File(
-                                                        "src/test/resources/org/apache/camel/itest/karaf/jre.properties")),
-                      // install the cxf jaxb spec as the karaf doesn't provide
-                      // it by default
-                      scanFeatures(getCamelKarafFeatureUrl(), "cxf-jaxb", "camel-core", "camel-spring",
-                                   "camel-test")};
+                      // override the config.properties (to fix pax-exam bug)
+                      replaceConfigurationFile("etc/config.properties", new File("src/test/resources/org/apache/camel/itest/karaf/config.properties")),
+                      // install the cxf jaxb spec as the karaf doesn't provide it by default
+                      scanFeatures(getCamelKarafFeatureUrl(), "cxf-jaxb", "camel-core", "camel-spring",
"camel-test")};
 
         return options;
 

Modified: camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/karaf/config.properties
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/karaf/config.properties?rev=1406486&r1=1406485&r2=1406486&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/karaf/config.properties
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/karaf/config.properties
Wed Nov  7 08:04:32 2012
@@ -17,6 +17,8 @@
 #
 ################################################################################
 
+# FIXING PAX-EXAM BUG
+
 #
 # This file lists Karaf default settings for this particular version of Karaf.
 # For easier maintenance when upgrading Karaf and to better document which
@@ -29,41 +31,62 @@
 #
 # Properties file inclusions (as a space separated list of relative paths)
 # Included files will override the values specified in this file
+# NB: ${includes} properties files are mandatory, it means that Karaf will not start
+# if the include file is not found
 #
 ${includes} = jre.properties custom.properties
 
 #
+# Properties file inclusions (as a space separated list of relative paths)
+# Included files will override the values specified in this file
+# NB: ${optionals} properties files are optionals, it means that Karaf will just
+# display a warning message but the bootstrap will be performed
+#
+# ${optionals} = my.properties
+
+
+#
 # Framework selection properties
 #
-karaf.framework=equinox
+karaf.framework=felix
 
 #
 # Location of the OSGi frameworks
 #
-karaf.framework.equinox=${karaf.default.repository}/org/eclipse/osgi/3.6.0.v20100517/osgi-3.6.0.v20100517.jar
-karaf.framework.felix=${karaf.default.repository}/org/apache/felix/org.apache.felix.framework/3.0.9/org.apache.felix.framework-3.0.9.jar
+karaf.framework.equinox=${karaf.default.repository}/org/eclipse/osgi/3.8.0.v20120529-1548/osgi-3.8.0.v20120529-1548.jar
+karaf.framework.felix=${karaf.default.repository}/org/apache/felix/org.apache.felix.framework/4.0.3/org.apache.felix.framework-4.0.3.jar
 
 #
 # Framework config properties.
 #
-org.osgi.framework.system.packages=org.osgi.framework; version=1.5.0, \
- org.osgi.framework.launch; version=1.0.0, \
- org.osgi.framework.hooks.service; version=1.0.0, \
- org.osgi.service.packageadmin; version=1.2.0, \
- org.osgi.service.startlevel; version=1.1.0, \
- org.osgi.service.url; version=1.0.0, \
- org.osgi.util.tracker; version=1.4.0, \
- org.apache.karaf.jaas.boot; version=2.2.2, \
- org.apache.karaf.version; version=2.2.2, \
+org.osgi.framework.system.packages= \
+ org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0", \
+ org.osgi.framework.wiring;uses:="org.osgi.resource,org.osgi.framework";version="1.1", \
+ org.osgi.framework.hooks.bundle;uses:="org.osgi.framework";version="1.1", \
+ org.osgi.framework.hooks.service;uses:="org.osgi.framework";version="1.1", \
+ org.osgi.framework.hooks.resolver;uses:="org.osgi.framework.wiring";version="1.0", \
+ org.osgi.framework.launch;uses:="org.osgi.framework";version="1.1", \
+ org.osgi.framework.namespace;uses:="org.osgi.resource";version="1.0", \
+ org.osgi.framework;version="1.7",\
+ org.osgi.framework.hooks.weaving;uses:="org.osgi.framework.wiring";version="1.0",\
+ org.osgi.resource;version="1.0",org.osgi.service.url;version="1.0",\
+ org.osgi.service.startlevel;uses:="org.osgi.framework";version="1.1",\
+ org.osgi.service.packageadmin;uses:="org.osgi.framework";version="1.2",\
+ org.osgi.service.url;version="1.0", \
+ org.osgi.util.tracker;uses:="org.osgi.framework";version="1.5.1", \
+ org.apache.karaf.jaas.boot;version="2.3.0", \
+ org.apache.karaf.jaas.boot.principal;version="2.3.0", \
+ org.apache.karaf.version;version="2.3.0", \
  ${jre-${java.specification.version}}
 
-org.osgi.framework.system.packages.extra=
+# Extra packages appended after standard packages
+# org.osgi.framework.system.packages.extra=
 
-# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
 
+# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
 org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*
 
 # OSGi Execution Environment
-org.osgi.framework.executionenvironment=J2SE-1.5,J2SE-1.4,J2SE-1.3,J2SE-1.2
+org.osgi.framework.executionenvironment=J2SE-1.7,JavaSE-1.7,J2SE-1.6,JavaSE-1.6,J2SE-1.5,JavaSE-1.5,J2SE-1.4,JavaSE-1.4,J2SE-1.3,JavaSE-1.3,J2SE-1.2,,JavaSE-1.2,CDC-1.1/Foundation-1.1,CDC-1.0/Foundation-1.0,J2ME,OSGi/Minimum-1.1,OSGi/Minimum-1.0
 
 # Set the parent classloader for the bundle to the classloader that loads the Framework (i.e.
everything in lib/*.jar)
 org.osgi.framework.bundle.parent=framework
@@ -72,7 +95,7 @@ org.osgi.framework.bundle.parent=framewo
 karaf.auto.start=startup.properties
 
 org.osgi.framework.startlevel.beginning=100
-karaf.startlevel.bundle=60
+karaf.startlevel.bundle=80
 
 karaf.shutdown.port.file=${karaf.data}/port
 
@@ -83,6 +106,7 @@ felix.fileinstall.dir    = ${karaf.base}
 felix.fileinstall.filter = .*\\.cfg
 felix.fileinstall.poll   = 1000
 felix.fileinstall.noInitialDelay = true
+felix.fileinstall.log.level = 3
 
 #
 # Delay for writing the framework state to disk in equinox
@@ -92,7 +116,9 @@ eclipse.stateSaveDelayInterval = 1000
 
 #
 # OBR Repository list
-# This property will be modified by the obr:addUrl and obr:removeUrl commands. 
+# This property will be modified by the obr:addUrl and obr:removeUrl commands.
 #
-obr.repository.url = 
+obr.repository.url =
+
+karaf.delay.console=false
 



Mime
View raw message