jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1355334 - in /jackrabbit/oak/trunk/oak-jcr: pom.xml src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
Date Fri, 29 Jun 2012 12:07:14 GMT
Author: mduerig
Date: Fri Jun 29 12:07:13 2012
New Revision: 1355334

URL: http://svn.apache.org/viewvc?rev=1355334&view=rev
Log:
OAK-159: Do not use in memory Microkernel for TCK
 switch tck tests to h2 based Microkernel

Modified:
    jackrabbit/oak/trunk/oak-jcr/pom.xml
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java

Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1355334&r1=1355333&r2=1355334&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-jcr/pom.xml Fri Jun 29 12:07:13 2012
@@ -217,6 +217,12 @@ org.apache.jackrabbit.test.api.observati
         <scope>test</scope>
     </dependency>
     <dependency>
+        <groupId>com.h2database</groupId>
+        <artifactId>h2</artifactId>
+        <version>1.3.158</version>
+        <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-jcr-tests</artifactId>
       <version>${jackrabbit.version}</version>

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java?rev=1355334&r1=1355333&r2=1355334&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
Fri Jun 29 12:07:13 2012
@@ -16,16 +16,21 @@
  */
 package org.apache.jackrabbit.oak.jcr;
 
-import org.apache.jackrabbit.test.NotExecutableException;
-import org.apache.jackrabbit.test.RepositoryStub;
+import java.io.IOException;
+import java.security.Principal;
+import java.util.Properties;
 
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
-import java.io.IOException;
-import java.security.Principal;
-import java.util.Properties;
+
+import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.mk.core.MicroKernelImpl;
+import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.core.ContentRepositoryImpl;
+import org.apache.jackrabbit.test.NotExecutableException;
+import org.apache.jackrabbit.test.RepositoryStub;
 
 public class OakRepositoryStub extends RepositoryStub {
 
@@ -40,7 +45,11 @@ public class OakRepositoryStub extends R
      */
     public OakRepositoryStub(Properties settings) throws RepositoryException, IOException
{
         super(settings);
-        repository = new RepositoryImpl();
+
+        MicroKernel microkernel = new MicroKernelImpl("target/mk-tck-" + System.currentTimeMillis());
+        ContentRepository contentRepository = new ContentRepositoryImpl(microkernel, null,
null);
+        repository = new RepositoryImpl(contentRepository);
+
         Session session = repository.login(superuser);
         try {
             TestContentLoader loader = new TestContentLoader();



Mime
View raw message