jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1501214 - in /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr: ./ nodetype/ observation/ query/ query/qom/ security/privilege/ security/user/
Date Tue, 09 Jul 2013 12:19:15 GMT
Author: mreutegg
Date: Tue Jul  9 12:19:14 2013
New Revision: 1501214

URL: http://svn.apache.org/r1501214
Log:
OAK-892: Parameterize oak-jcr tests
- All tests extending from AbstractRepositoryTest are not parameterized
- Turn long running ConcurrentAddTest into an integration test
- Mark test in ConcurrentAddIT as known issue for SegmentMK (OAK-786)
- Use in memory MicroKernel when possible

Added:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
  (contents, props changed)
      - copied, changed from r1501115, jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
  (with props)
Removed:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddTest.java
Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AutoCreatedItemsTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CRUDTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CompatibilityIssuesTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveRemoveTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderableNodesTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ValueFactoryTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeTypeTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/QueryTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/qom/QomTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeRegistrationTest.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AbstractImportTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java
Tue Jul  9 12:19:14 2013
@@ -16,12 +16,19 @@
  */
 package org.apache.jackrabbit.oak.jcr;
 
+import java.util.Arrays;
+import java.util.Collection;
+
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.SimpleCredentials;
 
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.junit.After;
+import org.junit.Ignore;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 /**
  * Abstract base class for repository tests providing methods for accessing
@@ -30,11 +37,29 @@ import org.junit.After;
  * Users of this class must call clear to close the session associated with
  * this instance and clean up the repository when done.
  */
+@RunWith(Parameterized.class)
+@Ignore("This abstract base class does not have any tests")
 public abstract class AbstractRepositoryTest {
 
+    @Parameterized.Parameters
+    public static Collection<Object[]> fixtures() {
+        Object[][] fixtures = new Object[][] {
+                {NodeStoreFixture.MK_IMPL},
+                {NodeStoreFixture.MONGO_MK},
+                {NodeStoreFixture.SEGMENT_MK},
+        };
+        return Arrays.asList(fixtures);
+    }
+
+    protected NodeStoreFixture fixture;
+    private NodeStore nodeStore = null;
     private Repository repository = null;
     private Session adminSession = null;
 
+    public AbstractRepositoryTest(NodeStoreFixture fixture) {
+        this.fixture = fixture;
+    }
+
     @After
     public void logout() throws RepositoryException {
         // release session field
@@ -44,11 +69,15 @@ public abstract class AbstractRepository
         }
         // release repository field
         repository = null;
+        if (nodeStore != null) {
+            fixture.dispose(nodeStore);
+        }
     }
 
     protected Repository getRepository() throws RepositoryException {
         if (repository == null) {
-            repository  = new Jcr().createRepository();
+            nodeStore = fixture.createNodeStore();
+            repository  = new Jcr(nodeStore).createRepository();
         }
         return repository;
     }

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AutoCreatedItemsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AutoCreatedItemsTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AutoCreatedItemsTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AutoCreatedItemsTest.java
Tue Jul  9 12:19:14 2013
@@ -32,6 +32,10 @@ import static org.junit.Assert.assertTru
  */
 public class AutoCreatedItemsTest extends AbstractRepositoryTest {
 
+    public AutoCreatedItemsTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Test
     public void autoCreatedItems() throws Exception {
         Session s = getAdminSession();

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CRUDTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CRUDTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CRUDTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CRUDTest.java
Tue Jul  9 12:19:14 2013
@@ -33,6 +33,10 @@ import static junit.framework.Assert.fai
 
 public class CRUDTest extends AbstractRepositoryTest {
 
+    public CRUDTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Test
     public void testCRUD() throws RepositoryException {
         Session session = getAdminSession();

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CompatibilityIssuesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CompatibilityIssuesTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CompatibilityIssuesTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/CompatibilityIssuesTest.java
Tue Jul  9 12:19:14 2013
@@ -33,6 +33,10 @@ import org.junit.Test;
  */
 public class CompatibilityIssuesTest extends AbstractRepositoryTest {
 
+    public CompatibilityIssuesTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     private static void check(Session session) throws RepositoryException {
         if (session.getNode("/testNode").getProperty("p1").getLong() +
                 session.getNode("/testNode").getProperty("p2").getLong() < 0) {

Copied: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
(from r1501115, jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java?p2=jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java&p1=jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddTest.java&r1=1501115&r2=1501214&rev=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
Tue Jul  9 12:19:14 2013
@@ -31,19 +31,26 @@ import com.google.common.collect.Iterabl
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
 
 /**
- * <code>ConcurrentAddTest</code> adds nodes with multiple sessions in separate
+ * <code>ConcurrentAddIT</code> adds nodes with multiple sessions in separate
  * locations of the repository.
  */
-public class ConcurrentAddTest extends AbstractRepositoryTest {
+public class ConcurrentAddIT extends AbstractRepositoryTest {
 
     private static final int NUM_WORKERS = 10;
 
     private static final int NODES_PER_WORKER = 100;
 
+    public ConcurrentAddIT(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Test
     public void addNodes() throws Exception {
+        // OAK-786
+        assumeTrue(fixture != NodeStoreFixture.SEGMENT_MK);
         List<Exception> exceptions = Collections.synchronizedList(
                 new ArrayList<Exception>());
         Node test = getAdminSession().getRootNode().addNode("test");

Propchange: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveRemoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveRemoveTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveRemoveTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/MoveRemoveTest.java
Tue Jul  9 12:19:14 2013
@@ -28,6 +28,10 @@ import org.junit.Test;
 
 public class MoveRemoveTest extends AbstractRepositoryTest {
 
+    public MoveRemoveTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Test
     public void removeExistingNode() throws RepositoryException {
         Session session = getAdminSession();

Added: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java?rev=1501214&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
(added)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
Tue Jul  9 12:19:14 2013
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.jcr;
+
+import java.io.Closeable;
+import java.io.IOException;
+
+import org.apache.jackrabbit.mk.core.MicroKernelImpl;
+import org.apache.jackrabbit.oak.plugins.mongomk.MongoMK;
+import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
+import org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore;
+import org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
+
+/**
+ * NodeStore fixture for parametrized tests.
+ */
+public abstract class NodeStoreFixture {
+
+    public static final NodeStoreFixture SEGMENT_MK = new NodeStoreFixture() {
+        @Override
+        public NodeStore createNodeStore() {
+            return new SegmentNodeStore(new MemoryStore());
+        }
+
+        @Override
+        public void dispose(NodeStore nodeStore) {
+        }
+    };
+
+    public static final NodeStoreFixture MONGO_MK = new NodeStoreFixture() {
+        @Override
+        public NodeStore createNodeStore() {
+            return new CloseableNodeStore(new MongoMK.Builder().open());
+        }
+
+        @Override
+        public void dispose(NodeStore nodeStore) {
+            if (nodeStore instanceof Closeable) {
+                try {
+                    ((Closeable) nodeStore).close();
+                } catch (IOException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        }
+    };
+
+    public static final NodeStoreFixture MK_IMPL = new NodeStoreFixture() {
+        @Override
+        public NodeStore createNodeStore() {
+            return new KernelNodeStore(new MicroKernelImpl());
+        }
+
+        @Override
+        public void dispose(NodeStore nodeStore) {
+        }
+    };
+
+    public abstract NodeStore createNodeStore();
+
+    public abstract void dispose(NodeStore nodeStore);
+
+    private static class CloseableNodeStore
+            extends KernelNodeStore implements Closeable {
+
+        private final MongoMK kernel;
+
+        public CloseableNodeStore(MongoMK kernel) {
+            super(kernel);
+            this.kernel = kernel;
+        }
+
+        @Override
+        public void close() throws IOException {
+            kernel.dispose();
+        }
+    }
+}

Propchange: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/NodeStoreFixture.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderableNodesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderableNodesTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderableNodesTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderableNodesTest.java
Tue Jul  9 12:19:14 2013
@@ -33,6 +33,10 @@ import static org.junit.Assert.assertTru
 
 public class OrderableNodesTest extends AbstractRepositoryTest {
 
+    public OrderableNodesTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Test
     public void testSimpleOrdering() throws RepositoryException {
         doTest("nt:unstructured");

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Tue Jul  9 12:19:14 2013
@@ -72,6 +72,10 @@ public class RepositoryTest extends Abst
     private static final String TEST_NODE = "test_node";
     private static final String TEST_PATH = '/' + TEST_NODE;
 
+    public RepositoryTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Before
     public void setup() throws RepositoryException {
         Session session = getAdminSession();

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ValueFactoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ValueFactoryTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ValueFactoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ValueFactoryTest.java
Tue Jul  9 12:19:14 2013
@@ -33,6 +33,10 @@ public class ValueFactoryTest extends Ab
 
     private ValueFactory valueFactory;
 
+    public ValueFactoryTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Before
     public void setup() throws RepositoryException {
         valueFactory = getAdminSession().getValueFactory();

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeTypeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeTypeTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeTypeTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeTypeTest.java
Tue Jul  9 12:19:14 2013
@@ -24,10 +24,15 @@ import javax.jcr.ValueFactory;
 import javax.jcr.nodetype.ConstraintViolationException;
 
 import org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest;
+import org.apache.jackrabbit.oak.jcr.NodeStoreFixture;
 import org.junit.Test;
 
 public class NodeTypeTest extends AbstractRepositoryTest {
 
+    public NodeTypeTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     /**
      * Add a node to a node type that does not accept child nodes
      * See OAK-479

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationTest.java
Tue Jul  9 12:19:14 2013
@@ -56,6 +56,7 @@ import com.google.common.util.concurrent
 import com.google.common.util.concurrent.SettableFuture;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest;
+import org.apache.jackrabbit.oak.jcr.NodeStoreFixture;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -69,6 +70,10 @@ public class ObservationTest extends Abs
     private Session observingSession;
     private ObservationManager observationManager;
 
+    public ObservationTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Before
     public void setup() throws RepositoryException {
         Session session = getAdminSession();

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/QueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/QueryTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/QueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/QueryTest.java
Tue Jul  9 12:19:14 2013
@@ -45,6 +45,7 @@ import javax.jcr.query.RowIterator;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.jackrabbit.commons.iterator.RowIterable;
 import org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest;
+import org.apache.jackrabbit.oak.jcr.NodeStoreFixture;
 import org.junit.Test;
 
 
@@ -53,6 +54,10 @@ import org.junit.Test;
  */
 public class QueryTest extends AbstractRepositoryTest {
 
+    public QueryTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @SuppressWarnings("deprecation")
     @Test
     public void simple() throws RepositoryException {

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/qom/QomTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/qom/QomTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/qom/QomTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/qom/QomTest.java
Tue Jul  9 12:19:14 2013
@@ -59,6 +59,7 @@ import javax.jcr.query.qom.Source;
 import javax.jcr.query.qom.UpperCase;
 
 import org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest;
+import org.apache.jackrabbit.oak.jcr.NodeStoreFixture;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -72,6 +73,10 @@ public class QomTest extends AbstractRep
     private ValueFactory vf;
     private QueryObjectModelFactory f;
 
+    public QomTest(NodeStoreFixture fixture) {
+        super(fixture);
+    }
+
     @Before
     public void before() throws RepositoryException {
         Session session = getAdminSession();

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeRegistrationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeRegistrationTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeRegistrationTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeRegistrationTest.java
Tue Jul  9 12:19:14 2013
@@ -35,7 +35,6 @@ import javax.jcr.security.Privilege;
 
 import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
 import org.apache.jackrabbit.commons.jackrabbit.authorization.AccessControlUtils;
-import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.oak.jcr.Jcr;
 import org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal;
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants;
@@ -57,8 +56,7 @@ public class PrivilegeRegistrationTest e
         super.setUp();
 
         // create a separate repository in order to be able to remove registered privileges.
-        String dir = "target/mk-tck-" + System.currentTimeMillis();
-        repository = new Jcr(new MicroKernelImpl(dir)).createRepository();
+        repository = new Jcr().createRepository();
         session = getAdminSession();
         privilegeManager = getPrivilegeManager(session);
 

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AbstractImportTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AbstractImportTest.java?rev=1501214&r1=1501213&r2=1501214&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AbstractImportTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/AbstractImportTest.java
Tue Jul  9 12:19:14 2013
@@ -33,7 +33,6 @@ import org.apache.jackrabbit.api.Jackrab
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.api.security.user.UserManager;
-import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.oak.jcr.Jcr;
 import org.apache.jackrabbit.oak.security.SecurityProviderImpl;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
@@ -74,8 +73,7 @@ public abstract class AbstractImportTest
             ConfigurationParameters config = new ConfigurationParameters(ImmutableMap.of(UserConfiguration.NAME,
new ConfigurationParameters(userParams)));
 
             SecurityProvider securityProvider = new SecurityProviderImpl(config);
-            String dir = "target/mk-tck-" + System.currentTimeMillis();
-            Jcr jcr = new Jcr(new MicroKernelImpl(dir));
+            Jcr jcr = new Jcr();
             jcr.with(securityProvider);
             repo = jcr.createRepository();
             adminSession = repo.login(getHelper().getSuperuserCredentials());



Mime
View raw message