Index: test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java
===================================================================
--- test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(revision 1179117)
+++ test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(working copy)
@@ -16,10 +16,20 @@
  */
 package org.apache.jackrabbit.performance;
 
+import java.util.Set;
+
 import org.testng.annotations.Test;
 
 public class PerformanceTest extends AbstractPerformanceTest {
 
+    @Override
+    protected Set<Class<? extends AbstractTest>> afterSuiteBuild(
+            Set<Class<? extends AbstractTest>> tests, String name, byte[] conf) {
+        tests.add(InMemoryPersistenceManagerTest.class);
+        tests.add(DerbyMemoryPersistenceManagerTest.class);
+        return super.afterSuiteBuild(tests, name, conf);
+    }
+
     @Test
     public void testPerformance() throws Exception {
         testPerformance("2.0");
Index: test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,30 @@
+/*
+ * 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.performance;
+
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager;
+
+public class InMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        InMemPersistenceManager pm = new InMemPersistenceManager();
+        pm.setPersistent(false);
+        return pm;
+    }
+}
Index: test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit20/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,51 @@
+/*
+ * 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.performance;
+
+import java.io.File;
+
+import javax.jcr.RepositoryException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager;
+import org.apache.jackrabbit.core.util.db.ConnectionFactory;
+
+public class DerbyMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    private File database;
+
+    public void beforeSuite() throws Exception {
+        database = File.createTempFile("jackrabbit-persistence-", "-derby");
+        database.delete();
+        super.beforeSuite();
+    }
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        DerbyPersistenceManager manager = new DerbyPersistenceManager();
+        manager.setDriver("org.apache.derby.jdbc.EmbeddedDriver");
+        manager.setUrl("jdbc:derby:" + database.getPath() + ";create=true");
+        manager.setConnectionFactory(new ConnectionFactory());
+        return manager;
+    }
+
+    public void afterSuite() throws RepositoryException {
+        FileUtils.deleteQuietly(database);
+        super.afterSuite();
+    }
+}
Index: test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,30 @@
+/*
+ * 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.performance;
+
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager;
+
+public class InMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        InMemPersistenceManager pm = new InMemPersistenceManager();
+        pm.setPersistent(false);
+        return pm;
+    }
+}
Index: test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java
===================================================================
--- test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(revision 1179117)
+++ test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(working copy)
@@ -16,13 +16,22 @@
  */
 package org.apache.jackrabbit.performance;
 
+import java.util.Set;
+
 import org.testng.annotations.Test;
 
 public class PerformanceTest extends AbstractPerformanceTest {
 
+    @Override
+    protected Set<Class<? extends AbstractTest>> afterSuiteBuild(
+            Set<Class<? extends AbstractTest>> tests, String name, byte[] conf) {
+        tests.add(InMemoryPersistenceManagerTest.class);
+        tests.add(DerbyMemoryPersistenceManagerTest.class);
+        return super.afterSuiteBuild(tests, name, conf);
+    }
+
     @Test
     public void testPerformance() throws Exception {
         testPerformance("2.2");
     }
-
 }
Index: test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,51 @@
+/*
+ * 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.performance;
+
+import java.io.File;
+
+import javax.jcr.RepositoryException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager;
+import org.apache.jackrabbit.core.util.db.ConnectionFactory;
+
+public class DerbyMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    private File database;
+
+    public void beforeSuite() throws Exception {
+        database = File.createTempFile("jackrabbit-persistence-", "-derby");
+        database.delete();
+        super.beforeSuite();
+    }
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        DerbyPersistenceManager manager = new DerbyPersistenceManager();
+        manager.setDriver("org.apache.derby.jdbc.EmbeddedDriver");
+        manager.setUrl("jdbc:derby:" + database.getPath() + ";create=true");
+        manager.setConnectionFactory(new ConnectionFactory());
+        return manager;
+    }
+
+    public void afterSuite() throws RepositoryException {
+        FileUtils.deleteQuietly(database);
+        super.afterSuite();
+    }
+}
Index: test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit22/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,30 @@
+/*
+ * 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.performance;
+
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager;
+
+public class InMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        InMemPersistenceManager pm = new InMemPersistenceManager();
+        pm.setPersistent(false);
+        return pm;
+    }
+}
Index: test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java
===================================================================
--- test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(revision 1179978)
+++ test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(working copy)
@@ -16,11 +16,21 @@
  */
 package org.apache.jackrabbit.performance;
 
+import java.util.Set;
+
 import org.apache.jackrabbit.core.query.lucene.join.QueryEngine;
 import org.testng.annotations.Test;
 
 public class PerformanceTest extends AbstractPerformanceTest {
 
+    @Override
+    protected Set<Class<? extends AbstractTest>> afterSuiteBuild(
+            Set<Class<? extends AbstractTest>> tests, String name, byte[] conf) {
+        tests.add(InMemoryPersistenceManagerTest.class);
+        tests.add(DerbyMemoryPersistenceManagerTest.class);
+        return super.afterSuiteBuild(tests, name, conf);
+    }
+
     @Test
     public void testPerformance() throws Exception {
         testPerformance("2.3");
Index: test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPersistenceManagerTest.java
===================================================================
--- test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPersistenceManagerTest.java	(revision 0)
+++ test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,146 @@
+/*
+ * 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.performance;
+
+import java.io.File;
+import java.util.UUID;
+
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.NamespaceRegistryImpl;
+import org.apache.jackrabbit.core.fs.mem.MemoryFileSystem;
+import org.apache.jackrabbit.core.id.NodeId;
+import org.apache.jackrabbit.core.id.PropertyId;
+import org.apache.jackrabbit.core.persistence.PMContext;
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.state.ChangeLog;
+import org.apache.jackrabbit.core.state.NodeState;
+import org.apache.jackrabbit.core.state.PropertyState;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.commons.name.NameConstants;
+import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
+
+public abstract class AbstractPersistenceManagerTest extends AbstractTest {
+
+    private static final Name TEST = NameFactoryImpl.getInstance().create("",
+            "test");
+
+    private static final NodeId ROOT_NODE_ID = NodeId
+            .valueOf("cafebabe-cafe-babe-cafe-babecafebabe");
+
+    private static final int NODE_COUNT = 10;
+
+    private static final int DATA_SIZE_KB = 5;
+
+    private File directory;
+
+    private PersistenceManager persistenceManager;
+
+    public void beforeSuite() throws Exception {
+        failOnRepositoryVersions("1.4", "1.5", "1.6");
+        directory = File.createTempFile("jackrabbit-persistence-", "-test");
+        directory.delete();
+        directory.mkdirs();
+    }
+
+    public void beforeTest() throws Exception {
+        persistenceManager = buildPersistenceManager();
+        persistenceManager.init(buildPmContext());
+    }
+
+    public void runTest() throws Exception {
+        createNodes(NODE_COUNT, DATA_SIZE_KB);
+    }
+
+    public void createNodes(final int nodes, final int dataSizeKb)
+            throws Exception {
+        final ChangeLog changes = new ChangeLog();
+        final Name nodePropName = NameFactoryImpl.getInstance().create("", "p");
+
+        // caching should not be an issue here
+        final String data = dataSizeKb > 0 ? createDataSize(dataSizeKb) : "";
+
+        for (int i = 0; i < nodes; i++) {
+            final NodeId id = randomId();
+
+            final NodeState ns = persistenceManager.createNew(id);
+            ns.setNodeTypeName(TEST);
+            ns.addPropertyName(NameConstants.JCR_PRIMARYTYPE);
+            ns.addPropertyName(nodePropName);
+            changes.added(ns);
+
+            if (dataSizeKb > 0) {
+                final PropertyState ps = persistenceManager
+                        .createNew(new PropertyId(id, nodePropName));
+                ps.setType(PropertyType.STRING);
+                ps.setValues(new InternalValue[] { InternalValue.create(data) });
+                changes.added(ps);
+            }
+        }
+        persistenceManager.store(changes);
+    }
+
+    /**
+     * Creates a message of size @msgSize in KB.
+     */
+    private static String createDataSize(int msgSize) {
+        // Java chars are 2 bytes
+        msgSize = msgSize / 2;
+        msgSize = msgSize * 1024;
+        StringBuilder sb = new StringBuilder(msgSize);
+        for (int i = 0; i < msgSize; i++) {
+            sb.append('a');
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Creates a random node identifier using a secure random number generator.
+     */
+    private static NodeId randomId() {
+        return NodeId.valueOf(UUID.randomUUID().toString());
+    }
+
+    protected NamespaceRegistry buildNamespaceRegistry() throws Exception {
+        return new NamespaceRegistryImpl(new MemoryFileSystem()) {
+        };
+    }
+    
+    protected PMContext buildPmContext() throws Exception{
+        return new PMContext(directory, new MemoryFileSystem(), ROOT_NODE_ID,
+                buildNamespaceRegistry(), null, null);
+    }
+
+    protected abstract PersistenceManager buildPersistenceManager()
+            throws Exception;
+
+    public void afterTest() throws RepositoryException {
+        try {
+            persistenceManager.close();
+        } catch (Exception e) {
+            //
+        }
+    }
+
+    public void afterSuite() throws RepositoryException {
+        FileUtils.deleteQuietly(directory);
+    }
+}
Index: test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java
===================================================================
--- test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java	(revision 1179117)
+++ test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java	(working copy)
@@ -23,6 +23,9 @@
 import java.io.OutputStream;
 import java.io.PrintWriter;
 import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Set;
 import java.util.regex.Pattern;
 
 import javax.jcr.Credentials;
@@ -50,9 +53,20 @@
     private Pattern repoPattern;
     private Pattern testPattern;
 
+    /**
+     * @param name the test suite name
+     */
     protected void testPerformance(String name) throws Exception {
+        testPerformance(name, System.getProperty("only", ".*"));
+    }
+
+    /**
+     * @param name the test suite name
+     * @param testPatternMatch the regexp matcher for class names
+     */
+    protected void testPerformance(String name, String testPatternMatch) throws Exception {
         repoPattern = Pattern.compile(System.getProperty("repo", "\\d\\.\\d"));
-        testPattern = Pattern.compile(System.getProperty("only", ".*"));
+        testPattern = Pattern.compile(testPatternMatch);
 
         // Create a repository using the Jackrabbit default configuration
         testPerformance(name, getDefaultConfig());
@@ -74,6 +88,10 @@
         }
     }
 
+    /**
+     * @param name the test suite name
+     * @param xml the repo configuration
+     */
     protected void testPerformance(String name, InputStream xml)
             throws Exception {
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
@@ -83,74 +101,132 @@
             xml.close();
         }
         byte[] conf = buffer.toByteArray();
+        
+        // keep the order of insertion
+        Set<Class<? extends AbstractTest>> tests = new LinkedHashSet<Class<? extends AbstractTest>>();
+        tests.add(LoginTest.class);
+        tests.add(LoginLogoutTest.class);
+        tests.add(ReadPropertyTest.class);
+        tests.add(SetPropertyTest.class);
+        tests.add(SmallFileReadTest.class);
+        tests.add(SmallFileWriteTest.class);
+        tests.add(BigFileReadTest.class);
+        tests.add(BigFileWriteTest.class);
+        tests.add(ConcurrentReadTest.class);
+        tests.add(ConcurrentReadWriteTest.class);
+        tests.add(SimpleSearchTest.class);
+        tests.add(SQL2SearchTest.class);
+        tests.add(DescendantSearchTest.class);
+        tests.add(SQL2DescendantSearchTest.class);
+        tests.add(TwoWayJoinTest.class);
+        tests.add(ThreeWayJoinTest.class);
+        tests.add(CreateManyChildNodesTest.class);
+        tests.add(UpdateManyChildNodesTest.class);
+        tests.add(TransientManyChildNodesTest.class);
+        tests.add(CreateUserTest.class);
+        tests.add(PathBasedQueryTest.class);
+        tests.add(AddGroupMembersTest.class);
+        tests.add(GroupMemberLookupTest.class);
+        tests.add(GroupGetMembersTest.class);
+
+        Set<Class<? extends AbstractTest>> filteredTests = afterSuiteBuild(
+                tests, name, conf);
+        Iterator<Class<? extends AbstractTest>> iterator = filteredTests
+                .iterator();
+        while (iterator.hasNext()) {
+            Class<? extends AbstractTest> c = iterator.next();
+            runTestGuarded(c, name, conf);
+        }
+    }
+    
+    /**
+     * Classes can extend this method to provide additional tests to the suite,
+     * before they get filtered.
+     * 
+     * @param tests
+     *            the original *full* set of tests
+     * @param name
+     *            the test suite name
+     * @param conf
+     *            the repo configuration
+     * 
+     * @return the filtered list of tests that are going to run in the current
+     *         session, base on the provided repository pattern and test name
+     *         pattern
+     */
+    protected Set<Class<? extends AbstractTest>> afterSuiteBuild(
+            Set<Class<? extends AbstractTest>> tests, String name, byte[] conf) {
+
+        // keep the order of insertion
+        Set<Class<? extends AbstractTest>> filteredTests = new LinkedHashSet<Class<? extends AbstractTest>>();
+        Iterator<Class<? extends AbstractTest>> iterator = tests.iterator();
+        while (iterator.hasNext()) {
+            Class<? extends AbstractTest> c = iterator.next();
+            final String testName = c.getName().substring(
+                    c.getName().lastIndexOf('.') + 1);
+            if (repoPattern.matcher(name).matches()
+                    && testPattern.matcher(testName).matches()) {
+                filteredTests.add(c);
+            }
+        }
+        return filteredTests;
+    }
 
-        runTest(new LoginTest(), name, conf);
-        runTest(new LoginLogoutTest(), name, conf);
-        runTest(new ReadPropertyTest(), name, conf);
-        runTest(new SetPropertyTest(), name, conf);
-        runTest(new SmallFileReadTest(), name, conf);
-        runTest(new SmallFileWriteTest(), name, conf);
-        runTest(new BigFileReadTest(), name, conf);
-        runTest(new BigFileWriteTest(), name, conf);
-        runTest(new ConcurrentReadTest(), name, conf);
-        runTest(new ConcurrentReadWriteTest(), name, conf);
-        runTest(new SimpleSearchTest(), name, conf);
-        runTest(new SQL2SearchTest(), name, conf);
-        runTest(new DescendantSearchTest(), name, conf);
-        runTest(new SQL2DescendantSearchTest(), name, conf);
-        runTest(new TwoWayJoinTest(), name, conf);
-        runTest(new ThreeWayJoinTest(), name, conf);
-        runTest(new CreateManyChildNodesTest(), name, conf);
-        runTest(new UpdateManyChildNodesTest(), name, conf);
-        runTest(new TransientManyChildNodesTest(), name, conf);
-        runTest(new CreateUserTest(), name, conf);
-        runTest(new PathBasedQueryTest(), name, conf);
+    /**
+     * Runs a test protected against NoClassDefFoundError, this helps whenever a
+     * test needs a newer version of the api.
+     * 
+     * @param test
+     *            the test to run
+     * @param name
+     *            the test suite name
+     * @param conf
+     *            the repo configuration
+     */
+    private void runTestGuarded(Class<? extends AbstractTest> testClass,
+            String name, byte[] conf) {
         try {
-            runTest(new AddGroupMembersTest(), name, conf);
-            runTest(new GroupMemberLookupTest(), name, conf);
-            runTest(new GroupGetMembersTest(), name, conf);
+            runTest(testClass.newInstance(), name, conf);
+        } catch (Exception e) {
+            System.out.println("Skipping " + testClass
+                    + " because of an instantiation error: " + e.getMessage());
         } catch (NoClassDefFoundError e) {
             // ignore these tests if the required jackrabbit-api
             // extensions are not available
+            System.out.println("Skipping " + testClass
+                    + " because of some missing classes: " + e.getMessage());
         }
     }
 
     private void runTest(AbstractTest test, String name, byte[] conf) {
-        if (repoPattern.matcher(name).matches()
-                &&  testPattern.matcher(test.toString()).matches()) {
-            // Create the repository directory
-            File dir = new File(
-                    new File("target", "repository"),
-                    name + "-" + test);
-            dir.mkdirs();
-
+        // Create the repository directory
+        File dir = new File(new File("target", "repository"), name + "-" + test);
+        dir.mkdirs();
+        try {
+            // Copy the configuration file into the repository directory
+            File xml = new File(dir, "repository.xml");
+            OutputStream output = FileUtils.openOutputStream(xml);
             try {
-                // Copy the configuration file into the repository directory
-                File xml = new File(dir, "repository.xml");
-                OutputStream output = FileUtils.openOutputStream(xml);
-                try {
-                    output.write(conf, 0, conf.length);
-                } finally {
-                    output.close();
-                }
+                output.write(conf, 0, conf.length);
+            } finally {
+                output.close();
+            }
 
-                // Create the repository
-                RepositoryImpl repository = createRepository(dir, xml);
-                try {
-                    // Run the test
-                    DescriptiveStatistics statistics = runTest(test, repository);
-                    if (statistics.getN() > 0) {
-                        writeReport(test.toString(), name, statistics);
-                    }
-                } finally {
-                    repository.shutdown();
+            // Create the repository
+            RepositoryImpl repository = createRepository(dir, xml);
+            try {
+                // Run the test
+                DescriptiveStatistics statistics = runTest(test, repository);
+                if (statistics.getN() > 0) {
+                    writeReport(test.toString(), name, statistics);
                 }
-            } catch (Throwable t) {
-                System.out.println(
-                        "Unable to run " + test + ": " + t.getMessage());
             } finally {
-                FileUtils.deleteQuietly(dir);
+                repository.shutdown();
             }
+        } catch (Throwable t) {
+            System.out.println("Unable to run " + test + ": " + t.getMessage());
+        } finally {
+            FileUtils.deleteQuietly(dir);
         }
     }
 
@@ -196,7 +272,7 @@
 
             writer.format(
                     "%-36.36s  %6.0f  %6.0f  %6.0f  %6.0f  %6.0f%n",
-                    name,
+                    name+"("+statistics.getN()+")",
                     statistics.getMin(),
                     statistics.getPercentile(10.0),
                     statistics.getPercentile(50.0),
Index: test/performance/base/pom.xml
===================================================================
--- test/performance/base/pom.xml	(revision 1179117)
+++ test/performance/base/pom.xml	(working copy)
@@ -48,7 +48,7 @@
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
-      <version>1.6.2</version> <!-- overridden by downstream projects -->
+      <version>2.0.0</version> <!-- overridden by downstream projects -->
       <scope>provided</scope>
     </dependency>
     <dependency>
Index: test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/InMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,30 @@
+/*
+ * 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.performance;
+
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager;
+
+public class InMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        InMemPersistenceManager pm = new InMemPersistenceManager();
+        pm.setPersistent(false);
+        return pm;
+    }
+}
Index: test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java
===================================================================
--- test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(revision 1179117)
+++ test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/PerformanceTest.java	(working copy)
@@ -16,10 +16,20 @@
  */
 package org.apache.jackrabbit.performance;
 
+import java.util.Set;
+
 import org.testng.annotations.Test;
 
 public class PerformanceTest extends AbstractPerformanceTest {
 
+    @Override
+    protected Set<Class<? extends AbstractTest>> afterSuiteBuild(
+            Set<Class<? extends AbstractTest>> tests, String name, byte[] conf) {
+        tests.add(InMemoryPersistenceManagerTest.class);
+        tests.add(DerbyMemoryPersistenceManagerTest.class);
+        return super.afterSuiteBuild(tests, name, conf);
+    }
+
     @Test
     public void testPerformance() throws Exception {
         testPerformance("2.1");
Index: test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit21/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,51 @@
+/*
+ * 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.performance;
+
+import java.io.File;
+
+import javax.jcr.RepositoryException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager;
+import org.apache.jackrabbit.core.util.db.ConnectionFactory;
+
+public class DerbyMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    private File database;
+
+    public void beforeSuite() throws Exception {
+        database = File.createTempFile("jackrabbit-persistence-", "-derby");
+        database.delete();
+        super.beforeSuite();
+    }
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        DerbyPersistenceManager manager = new DerbyPersistenceManager();
+        manager.setDriver("org.apache.derby.jdbc.EmbeddedDriver");
+        manager.setUrl("jdbc:derby:" + database.getPath() + ";create=true");
+        manager.setConnectionFactory(new ConnectionFactory());
+        return manager;
+    }
+
+    public void afterSuite() throws RepositoryException {
+        FileUtils.deleteQuietly(database);
+        super.afterSuite();
+    }
+}
Index: test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java
===================================================================
--- test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
+++ test/performance/jackrabbit23/src/test/java/org/apache/jackrabbit/performance/DerbyMemoryPersistenceManagerTest.java	(revision 0)
@@ -0,0 +1,51 @@
+/*
+ * 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.performance;
+
+import java.io.File;
+
+import javax.jcr.RepositoryException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager;
+import org.apache.jackrabbit.core.util.db.ConnectionFactory;
+
+public class DerbyMemoryPersistenceManagerTest extends
+        AbstractPersistenceManagerTest {
+
+    private File database;
+
+    public void beforeSuite() throws Exception {
+        database = File.createTempFile("jackrabbit-persistence-", "-derby");
+        database.delete();
+        super.beforeSuite();
+    }
+
+    protected PersistenceManager buildPersistenceManager() throws Exception {
+        DerbyPersistenceManager manager = new DerbyPersistenceManager();
+        manager.setDriver("org.apache.derby.jdbc.EmbeddedDriver");
+        manager.setUrl("jdbc:derby:" + database.getPath() + ";create=true");
+        manager.setConnectionFactory(new ConnectionFactory());
+        return manager;
+    }
+
+    public void afterSuite() throws RepositoryException {
+        FileUtils.deleteQuietly(database);
+        super.afterSuite();
+    }
+}
