jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1503621 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
Date Tue, 16 Jul 2013 09:08:58 GMT
Author: jukka
Date: Tue Jul 16 09:08:58 2013
New Revision: 1503621

URL: http://svn.apache.org/r1503621
Log:
OAK-786: Fall back to pessimism

Enable ConcurrentAddIT also for the SegmentMK

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java?rev=1503621&r1=1503620&r2=1503621&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddIT.java
Tue Jul 16 09:08:58 2013
@@ -18,20 +18,20 @@ package org.apache.jackrabbit.oak.jcr;
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.jackrabbit.commons.iterator.NodeIterable;
 import org.junit.Test;
 
-import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
 
+import static org.apache.jackrabbit.commons.JcrUtils.in;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
 /**
  * <code>ConcurrentAddIT</code> adds nodes with multiple sessions in separate
@@ -47,10 +47,8 @@ public class ConcurrentAddIT extends Abs
         super(fixture);
     }
 
-    @Test
+    @Test @SuppressWarnings("unchecked")
     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");
@@ -71,8 +69,8 @@ public class ConcurrentAddIT extends Abs
             fail(e.toString());
         }
         getAdminSession().refresh(false);
-        for (Node n : new NodeIterable(test.getNodes())) {
-            assertEquals(NODES_PER_WORKER, Iterables.size(new NodeIterable(n.getNodes())));
+        for (Node n : in((Iterator<Node>) test.getNodes())) {
+            assertEquals(NODES_PER_WORKER, Iterators.size(n.getNodes()));
         }
     }
 



Mime
View raw message