You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by mr...@apache.org on 2016/01/12 16:22:26 UTC
svn commit: r1724258 -
/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CheckpointsTest.java
Author: mreutegg
Date: Tue Jan 12 15:22:26 2016
New Revision: 1724258
URL: http://svn.apache.org/viewvc?rev=1724258&view=rev
Log:
OAK-3858: Review slow running tests
Use explicit clusterId to speed up DocumentNodeStore construction
Modified:
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CheckpointsTest.java
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CheckpointsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CheckpointsTest.java?rev=1724258&r1=1724257&r2=1724258&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CheckpointsTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CheckpointsTest.java Tue Jan 12 15:22:26 2016
@@ -242,9 +242,9 @@ public class CheckpointsTest {
// this test
final int asyncDelay = (int) TimeUnit.MINUTES.toMillis(1);
DocumentStore store = new MemoryDocumentStore();
- final DocumentNodeStore ns1 = builderProvider.newBuilder()
+ final DocumentNodeStore ns1 = builderProvider.newBuilder().setClusterId(1)
.setDocumentStore(store).setAsyncDelay(asyncDelay).getNodeStore();
- final DocumentNodeStore ns2 = builderProvider.newBuilder()
+ final DocumentNodeStore ns2 = builderProvider.newBuilder().setClusterId(2)
.setDocumentStore(store).setAsyncDelay(asyncDelay).getNodeStore();
// create node on ns1
@@ -287,7 +287,7 @@ public class CheckpointsTest {
@Test
public void crossClusterCheckpointNewClusterNode() throws Exception {
DocumentStore store = new MemoryDocumentStore();
- DocumentNodeStore ns1 = builderProvider.newBuilder()
+ DocumentNodeStore ns1 = builderProvider.newBuilder().setClusterId(1)
.setDocumentStore(store).setAsyncDelay(0).getNodeStore();
// create 'foo' on ns1
@@ -307,7 +307,7 @@ public class CheckpointsTest {
ns1.runBackgroundOperations();
// now start second node store
- DocumentNodeStore ns2 = builderProvider.newBuilder()
+ DocumentNodeStore ns2 = builderProvider.newBuilder().setClusterId(2)
.setDocumentStore(store).setAsyncDelay(0).getNodeStore();
NodeBuilder b2 = ns2.getRoot().builder();
b2.child("baz");
@@ -323,7 +323,7 @@ public class CheckpointsTest {
@Test
public void crossClusterReadOldCheckpoint() throws Exception {
DocumentStore store = new MemoryDocumentStore();
- DocumentNodeStore ns1 = builderProvider.newBuilder()
+ DocumentNodeStore ns1 = builderProvider.newBuilder().setClusterId(1)
.setDocumentStore(store).setAsyncDelay(0).getNodeStore();
NodeBuilder b1 = ns1.getRoot().builder();
@@ -340,7 +340,7 @@ public class CheckpointsTest {
store.createOrUpdate(Collection.SETTINGS, update);
// now start second node store
- DocumentNodeStore ns2 = builderProvider.newBuilder()
+ DocumentNodeStore ns2 = builderProvider.newBuilder().setClusterId(2)
.setDocumentStore(store).setAsyncDelay(0).getNodeStore();
NodeBuilder b2 = ns2.getRoot().builder();
b2.child("baz");