Index: oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/index/LuceneInitialContent.java
===================================================================
--- oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/index/LuceneInitialContent.java	(revision 0)
+++ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/query/index/LuceneInitialContent.java	(revision 0)
@@ -0,0 +1,55 @@
+/*
+ * 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.query.index;
+
+import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer;
+import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
+import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
+
+public class LuceneInitialContent implements RepositoryInitializer {
+
+    private final static String name = "luceneGlobal";
+
+    @Override
+    public void initialize(NodeStore store) {
+        NodeBuilder verify = store.getRoot().builder();
+        if (verify.hasChildNode("oak:index")) {
+            if (verify.child("oak:index").hasChildNode(name)) {
+                return;
+            }
+        }
+
+        NodeStoreBranch branch = store.branch();
+        NodeBuilder root = branch.getRoot().builder();
+
+        NodeBuilder index = root.child("oak:index");
+        index.child("luceneGlobal")
+                .setProperty("jcr:primaryType", "oak:queryIndexDefinition",
+                        Type.NAME).setProperty("type", "lucene");
+
+        try {
+            branch.setRoot(root.getNodeState());
+            branch.merge();
+        } catch (CommitFailedException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+}
Index: oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java
===================================================================
--- oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java	(revision 1411262)
+++ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/AbstractRepositoryTest.java	(working copy)
@@ -25,6 +25,7 @@
 import javax.jcr.SimpleCredentials;
 import javax.security.auth.login.Configuration;
 
+import org.apache.jackrabbit.oak.jcr.query.index.LuceneInitialContent;
 import org.apache.jackrabbit.oak.security.OakConfiguration;
 import org.junit.After;
 import org.junit.Before;
@@ -67,7 +68,8 @@
 
     protected Repository getRepository() throws RepositoryException {
         if (repository == null) {
-            repository  = new Jcr().with(getExecutor()).createRepository();
+            repository = new Jcr().with(getExecutor())
+                    .with(new LuceneInitialContent()).createRepository();
         }
         return repository;
     }
Index: oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
===================================================================
--- oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java	(revision 1411262)
+++ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java	(working copy)
@@ -28,6 +28,7 @@
 import javax.security.auth.login.Configuration;
 
 import org.apache.jackrabbit.mk.core.MicroKernelImpl;
+import org.apache.jackrabbit.oak.jcr.query.index.LuceneInitialContent;
 import org.apache.jackrabbit.oak.security.OakConfiguration;
 import org.apache.jackrabbit.test.NotExecutableException;
 import org.apache.jackrabbit.test.RepositoryStub;
@@ -51,6 +52,7 @@
         String dir = "target/mk-tck-" + System.currentTimeMillis();
         repository = new Jcr(new MicroKernelImpl(dir))
             .with(Executors.newScheduledThreadPool(1))
+            .with(new LuceneInitialContent())
             .createRepository();
 
         Session session = repository.login(superuser);
