jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1411247 - in /jackrabbit/oak/trunk/oak-it/osgi: pom.xml src/test/config/ src/test/config/org.apache.jackrabbit.mk.osgi.MicroKernelService.cfg src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java
Date Mon, 19 Nov 2012 15:28:35 GMT
Author: chetanm
Date: Mon Nov 19 15:28:34 2012
New Revision: 1411247

URL: http://svn.apache.org/viewvc?rev=1411247&view=rev
Log:
OAK-454 - Make In Memory/H2 MicroKernal depend explicit configuration to activate

Modified the testcase to also install required configuration to activate MicroKernalService.
Any config present under src/test/config directory would be copied to target/test-config and
that would be registered with OSGi ConfigAdmin using Felix File Install support

Added:
    jackrabbit/oak/trunk/oak-it/osgi/src/test/config/
    jackrabbit/oak/trunk/oak-it/osgi/src/test/config/org.apache.jackrabbit.mk.osgi.MicroKernelService.cfg
Modified:
    jackrabbit/oak/trunk/oak-it/osgi/pom.xml
    jackrabbit/oak/trunk/oak-it/osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java

Modified: jackrabbit/oak/trunk/oak-it/osgi/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/osgi/pom.xml?rev=1411247&r1=1411246&r2=1411247&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/osgi/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-it/osgi/pom.xml Mon Nov 19 15:28:34 2012
@@ -36,6 +36,15 @@
   </properties>
 
   <build>
+      <resources>
+          <resource>
+              <directory>src/test/config</directory>
+              <includes>
+                  <include>*.cfg</include>
+              </includes>
+              <targetPath>${project.build.directory}/test-config</targetPath>
+          </resource>
+      </resources>
     <plugins>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
@@ -125,7 +134,7 @@
     <dependency>
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.framework</artifactId>
-      <version>4.0.1</version>
+      <version>4.0.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Added: jackrabbit/oak/trunk/oak-it/osgi/src/test/config/org.apache.jackrabbit.mk.osgi.MicroKernelService.cfg
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/osgi/src/test/config/org.apache.jackrabbit.mk.osgi.MicroKernelService.cfg?rev=1411247&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-it/osgi/src/test/config/org.apache.jackrabbit.mk.osgi.MicroKernelService.cfg
(added)
+++ jackrabbit/oak/trunk/oak-it/osgi/src/test/config/org.apache.jackrabbit.mk.osgi.MicroKernelService.cfg
Mon Nov 19 15:28:34 2012
@@ -0,0 +1 @@
+name="Oak"

Modified: jackrabbit/oak/trunk/oak-it/osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java?rev=1411247&r1=1411246&r2=1411247&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java
(original)
+++ jackrabbit/oak/trunk/oak-it/osgi/src/test/java/org/apache/jackrabbit/oak/osgi/OSGiIT.java
Mon Nov 19 15:28:34 2012
@@ -33,6 +33,7 @@ import org.ops4j.pax.exam.CoreOptions;
 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.SystemPropertyOption;
 import org.ops4j.pax.exam.options.UrlProvisionOption;
 
 import static junit.framework.Assert.assertNotNull;
@@ -40,6 +41,7 @@ import static junit.framework.Assert.ass
 import static org.ops4j.pax.exam.CoreOptions.bundle;
 import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.systemProperties;
 
 @RunWith(JUnit4TestRunner.class)
 public class OSGiIT {
@@ -49,6 +51,9 @@ public class OSGiIT {
         return CoreOptions.options(
                 junitBundles(),
                 mavenBundle("org.apache.felix", "org.apache.felix.scr", "1.6.0"),
+                mavenBundle( "org.apache.felix", "org.apache.felix.configadmin", "1.4.0"
),
+                mavenBundle( "org.apache.felix", "org.apache.felix.fileinstall", "3.2.6"
),
+                systemProperties(new SystemPropertyOption("felix.fileinstall.dir").value(getConfigDir())),
                 jarBundle("jcr.jar"),
                 jarBundle("guava.jar"),
                 jarBundle("jackrabbit-api.jar"),
@@ -63,6 +68,12 @@ public class OSGiIT {
                 jarBundle("tika-core.jar"));
     }
 
+    private String getConfigDir(){
+        File target = new File("target");
+        File configDir = new File(target,"test-config");
+        return configDir.getAbsolutePath();
+    }
+
     private UrlProvisionOption jarBundle(String jar)
             throws MalformedURLException {
         File target = new File("target");



Mime
View raw message