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 da...@apache.org on 2014/06/04 12:23:33 UTC
svn commit: r1600088 [3/3] - in /jackrabbit/oak/trunk:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/
oak-core/src/test/java/org/apache/jackrabb...
Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderedIndexConcurrentClusterIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderedIndexConcurrentClusterIT.java?rev=1600088&r1=1600087&r2=1600088&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderedIndexConcurrentClusterIT.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OrderedIndexConcurrentClusterIT.java Wed Jun 4 10:23:33 2014
@@ -29,6 +29,7 @@ import java.util.Map;
import javax.jcr.Credentials;
import javax.jcr.Node;
import javax.jcr.NodeIterator;
+import javax.jcr.PathNotFoundException;
import javax.jcr.PropertyType;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
@@ -43,7 +44,6 @@ import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -52,6 +52,7 @@ public class OrderedIndexConcurrentClust
private static final Logger LOG = LoggerFactory.getLogger(OrderedIndexConcurrentClusterIT.class);
private static final int NUM_CLUSTER_NODES = 5;
+ private static final int LOOP = 2800;
private static final int COUNT = 5;
private static final Credentials ADMIN = new SimpleCredentials("admin", "admin".toCharArray());
private static final String INDEX_NODE_NAME = "lastModified";
@@ -174,7 +175,14 @@ public class OrderedIndexConcurrentClust
Map<String, Exception> exceptions)
throws RepositoryException {
- Node root = session.getRootNode().getNode(nodeName);
+ Node root;
+ try {
+ root = session.getRootNode().getNode(nodeName);
+ } catch (PathNotFoundException e) {
+ LOG.error("Not found. {}", nodeName);
+ throw e;
+ }
+
NodeIterator children = root.getNodes();
while (children.hasNext()) {
@@ -183,7 +191,7 @@ public class OrderedIndexConcurrentClust
while (children2.hasNext()) {
children2.nextNode().remove();
}
- LOG.debug("deleting {}", node.getName());
+ LOG.debug("deleting /{}/{}", nodeName, node.getName());
node.remove();
session.save();
}
@@ -202,10 +210,9 @@ public class OrderedIndexConcurrentClust
}
}
- @Ignore("OAK-1717")
@Test
public void deleteConcurrently() throws Exception {
- final int loop = 120;
+ final int loop = LOOP;
final int count = COUNT;
final int clusters = NUM_CLUSTER_NODES;
@@ -251,6 +258,11 @@ public class OrderedIndexConcurrentClust
session.save();
if (exceptions.isEmpty()) {
+ // ensuring the cluster is aligned before triggering in order to avoid any
+ // PathNotFoundException
+ for (DocumentMK mk : mks) {
+ mk.getNodeStore().runBackgroundOperations();
+ }
for (Thread t : workers) {
t.start();
}