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 re...@apache.org on 2014/03/18 16:12:55 UTC

svn commit: r1578949 [2/3] - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/document/ main/java/org/apache/jackrabbit/oak/plugins/document/cache/ main/java/org/apache/jackrabbit/oak/plugins/document/memory/ main/java...

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java Tue Mar 18 15:12:53 2014
@@ -29,10 +29,10 @@ import org.junit.BeforeClass;
  * skipped if the configured MongoDB connection can not be created.
  */
 public abstract class AbstractMongoConnectionTest extends DocumentMKTestBase {
-    
+
     protected MongoConnection mongoConnection;
     protected DocumentMK mk;
-    
+
     @BeforeClass
     public static void checkMongoDbAvailable() {
         Assume.assumeNotNull(MongoUtils.getConnection());

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceTest.java Tue Mar 18 15:12:53 2014
@@ -34,7 +34,7 @@ import org.junit.Test;
  * Test the BlobReferenceIterator.
  */
 public class BlobReferenceTest {
-    
+
     @Test
     public void test() throws Exception {
         DocumentNodeStore s = new DocumentMK.Builder().getNodeStore();
@@ -54,7 +54,7 @@ public class BlobReferenceTest {
         assertTrue(set.isEmpty());
         s.dispose();
     }
-    
+
     static InputStream randomStream(int seed, int size) {
         Random r = new Random(seed);
         byte[] data = new byte[size];

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobTest.java Tue Mar 18 15:12:53 2014
@@ -31,7 +31,7 @@ import com.mongodb.DB;
  * Tests the blob store.
  */
 public class BlobTest {
-    
+
     private static final Logger LOG = LoggerFactory.getLogger(RandomizedClusterTest.class);
 
 //     private static final boolean MONGO_DB = true;
@@ -41,11 +41,11 @@ public class BlobTest {
     private static final boolean MONGO_DB = false;
     private static final long TOTAL_SIZE = 1 * 1024 * 1024;
     private static final int DOCUMENT_COUNT = 10;
-    
+
     DB openMongoConnection() {
         return MONGO_DB ? MongoUtils.getConnection().getDB() : null;
     }
-    
+
     void dropCollections() {
         if (MONGO_DB) {
             MongoUtils.dropCollections(MongoUtils.getConnection().getDB());
@@ -58,7 +58,7 @@ public class BlobTest {
                 setMongoDB(openMongoConnection()).open();
         long blobSize = TOTAL_SIZE / DOCUMENT_COUNT;
         ArrayList<String> blobIds = new ArrayList<String>();
-        // use a new seed each time, to allow running the test multiple times 
+        // use a new seed each time, to allow running the test multiple times
         Random r = new Random();
         for (int i = 0; i < DOCUMENT_COUNT; i++) {
             log("writing " + i + "/" + DOCUMENT_COUNT);
@@ -70,9 +70,9 @@ public class BlobTest {
         }
         mk.dispose();
     }
-    
+
     private static void log(String s) {
         LOG.info(s);
     }
-    
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterInfoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterInfoTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterInfoTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterInfoTest.java Tue Mar 18 15:12:53 2014
@@ -33,10 +33,10 @@ import com.mongodb.WriteConcern;
  * Test the ClusterInfo class
  */
 public class ClusterInfoTest {
-    
+
     @Test
     public void readWriteMode() throws InterruptedException {
-        
+
         MemoryDocumentStore mem = new MemoryDocumentStore();
         DocumentNodeStore ns1 = new DocumentMK.Builder().
                 setDocumentStore(mem).
@@ -51,7 +51,7 @@ public class ClusterInfoTest {
         List<ClusterNodeInfoDocument> list = mem.query(
                 Collection.CLUSTER_NODES, "0", "a", Integer.MAX_VALUE);
         assertEquals(2, list.size());
-        
+
         assertNull(mem.getReadPreference());
         assertNull(mem.getWriteConcern());
         mem.setReadWriteMode("read:primary, write:majority");
@@ -59,7 +59,7 @@ public class ClusterInfoTest {
         assertEquals(WriteConcern.MAJORITY, mem.getWriteConcern());
 
         UpdateOp op;
-        
+
         // unknown modes: ignore
         op = new UpdateOp(list.get(0).getId(), false);
         op.set("readWriteMode", "read:xyz, write:abc");

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java Tue Mar 18 15:12:53 2014
@@ -88,7 +88,7 @@ public class ClusterTest {
 
         mk2.commit("/", "^\"test/x\":1", null, null);
         String n3 = mk3.getNodes("/test", mk3.getHeadRevision(), 0, 0, 10, null);
-        // mk3 didn't see the previous change yet; 
+        // mk3 didn't see the previous change yet;
         // it is questionable if this should prevent any changes to this node
         // (currently it does not)
         assertEquals("{\":childNodeCount\":0}", n3);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest2.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest2.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest2.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest2.java Tue Mar 18 15:12:53 2014
@@ -26,13 +26,13 @@ import static org.junit.Assert.assertEqu
  * A set of simple cluster tests.
  */
 public class ClusterTest2 {
-    
+
     @Test
     public void twoNodes() throws Exception {
         MemoryDocumentStore ds = new MemoryDocumentStore();
         MemoryBlobStore bs = new MemoryBlobStore();
         DocumentMK.Builder builder;
-        
+
         builder = new DocumentMK.Builder();
         builder.setDocumentStore(ds).setBlobStore(bs);
         DocumentMK mk1 = builder.setClusterId(1).open();
@@ -42,7 +42,7 @@ public class ClusterTest2 {
 
         mk1.commit("/", "+\"test\":{\"x\": 1}", null, null);
         mk1.backgroundWrite();
-        
+
         mk2.backgroundRead();
         String b1 = mk2.branch(mk2.getHeadRevision());
         mk2.commit("/", "-\"test\"", b1, null);
@@ -50,11 +50,11 @@ public class ClusterTest2 {
         String b2b = mk2.commit("/", "-\"test\"", b2, null);
         mk2.merge(b2b, null);
         mk2.backgroundWrite();
-        
+
         mk1.backgroundRead();
         mk1.commit("/", "+\"test\":{\"x\": 1}", null, null);
         mk1.backgroundWrite();
-        
+
         mk2.backgroundRead();
 
         String n1 = mk1.getNodes("/test", mk1.getHeadRevision(), 0, 0, 10, null);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java Tue Mar 18 15:12:53 2014
@@ -98,7 +98,7 @@ public class ConflictTest extends BaseDo
         branchRev2 = mk.commit("/foo", "^\"prop\":\"other\"", branchRev2, null);
 
         mk.merge(branchRev2, null);
-        
+
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for addExistingProperty");
@@ -172,13 +172,13 @@ public class ConflictTest extends BaseDo
         String rev = mk.commit("/", "+\"foo\":{\"prop\":\"value\"}", null, null);
         String branchRev1 = mk.branch(rev);
         branchRev1 = mk.commit("/foo", "^\"prop\":null", branchRev1, null);
-        
+
         String branchRev2 = mk.branch(rev);
         // will mark collision on branchRev1
         branchRev2 = mk.commit("/foo", "^\"prop\":null", branchRev2, null);
 
         mk.merge(branchRev2, null);
-        
+
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for removeRemovedProperty");
@@ -252,7 +252,7 @@ public class ConflictTest extends BaseDo
         String rev = mk.commit("/", "+\"foo\":{\"prop\":\"value\"}", null, null);
         String branchRev1 = mk.branch(rev);
         branchRev1 = mk.commit("/foo", "^\"prop\":null", branchRev1, null);
-        
+
         String branchRev2 = mk.branch(rev);
         // will mark conflict on branchRev1
         branchRev2 = mk.commit("/foo", "^\"prop\":\"bar\"", branchRev2, null);
@@ -331,7 +331,7 @@ public class ConflictTest extends BaseDo
         String rev = mk.commit("/", "+\"foo\":{\"prop\":\"value\"}", null, null);
         String branchRev1 = mk.branch(rev);
         branchRev1 = mk.commit("/foo", "^\"prop\":\"bar\"", branchRev1, null);
-        
+
         String branchRev2 = mk.branch(rev);
         // will mark collision on branchRev1
         branchRev2 = mk.commit("/foo", "^\"prop\":null", branchRev2, null);
@@ -489,13 +489,13 @@ public class ConflictTest extends BaseDo
         String rev = mk.commit("/", "+\"foo\":{}", null, null);
         String branchRev1 = mk.branch(rev);
         branchRev1 = mk.commit("/foo", "+\"bar\":{}", branchRev1, null);
-        
+
         String branchRev2 = mk.branch(rev);
         // will mark conflict on branchRev1
         branchRev2 = mk.commit("/foo", "+\"bar\":{}", branchRev2, null);
 
         mk.merge(branchRev2, null);
-        
+
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for addExistingNode");
@@ -569,7 +569,7 @@ public class ConflictTest extends BaseDo
         String rev = mk.commit("/", "+\"foo\":{}", null, null);
         String branchRev1 = mk.branch(rev);
         branchRev1 = mk.commit("/", "-\"foo\"", branchRev1, null);
-        
+
         String branchRev2 = mk.branch(rev);
         // will mark collision on branchRev1
         branchRev2 = mk.commit("/", "-\"foo\"", branchRev2, null);
@@ -648,7 +648,7 @@ public class ConflictTest extends BaseDo
         String rev = mk.commit("/", "+\"foo\":{}", null, null);
         String branchRev1 = mk.branch(rev);
         branchRev1 = mk.commit("/", "-\"foo\"", branchRev1, null);
-        
+
         String branchRev2 = mk.branch(rev);
         // will mark collision on branchRev1
         branchRev2 = mk.commit("/foo", "^\"prop\":\"value\"", branchRev2, null);
@@ -727,7 +727,7 @@ public class ConflictTest extends BaseDo
         String rev = mk.commit("/", "+\"foo\":{}", null, null);
         String branchRev1 = mk.branch(rev);
         branchRev1 = mk.commit("/foo", "^\"prop\":\"value\"", branchRev1, null);
-        
+
         String branchRev2 = mk.branch(rev);
         // will mark collision on branchRev1
         branchRev2 = mk.commit("/", "-\"foo\"", branchRev2, null);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchTest.java Tue Mar 18 15:12:53 2014
@@ -45,8 +45,8 @@ public class DocumentMKBranchTest extend
      * </pre>
      * The test reads /child from <code>branchRev2</code> and expects
      * the version from the first commit.
-     * 
-     * @throws ParseException 
+     *
+     * @throws ParseException
      */
     @Test
     public void isolatedBranches() throws ParseException {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitCopyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitCopyTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitCopyTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitCopyTest.java Tue Mar 18 15:12:53 2014
@@ -88,7 +88,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void copyNodeWithProperties() throws Exception {
         mk.commit("/", "+\"a\" : { \"key1\" : \"value1\" }", null, null);
         assertTrue(mk.nodeExists("/a", null));
@@ -130,7 +130,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void addNodeAndCopy() {
         mk.commit("/", "+\"a\":{}", null, null);
         mk.commit("/", "+\"a/b\":{}\n" +
@@ -151,7 +151,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void addNodeWithChildrenAndCopy() {
         mk.commit("/", "+\"a\":{}", null, null);
         mk.commit("/", "+\"a/b\":{ \"c\" : {}, \"d\" : {} }\n" +
@@ -164,7 +164,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void addNodeWithNestedChildrenAndCopy() {
         mk.commit("/", "+\"a\":{ \"b\" : { \"c\" : { } } }", null, null);
         mk.commit("/", "+\"a/b/c/d\":{}\n"
@@ -175,7 +175,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void addNodeAndCopyParent() {
         mk.commit("/", "+\"a\":{}", null, null);
         mk.commit("/", "+\"a/b\":{}\n" +
@@ -186,7 +186,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void removeNodeAndCopy() {
         mk.commit("/", "+\"a\":{ \"b\" : {} }", null, null);
 
@@ -200,7 +200,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void removeNodeWithNestedChildrenAndCopy() {
         mk.commit("/", "+\"a\":{ \"b\" : { \"c\" : { \"d\" : {} } } }", null, null);
         mk.commit("/", "-\"a/b/c/d\"\n"
@@ -212,7 +212,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void removeNodeAndCopyParent() {
         mk.commit("/", "+\"a\":{ \"b\" : {} }", null, null);
         mk.commit("/", "-\"a/b\"\n" +
@@ -223,7 +223,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void setPropertyAndCopy() {
         mk.commit("/", "+\"a\":{}", null, null);
         mk.commit("/", "^\"a/key1\": \"value1\"\n" +
@@ -236,7 +236,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void setNestedPropertyAndCopy() {
         mk.commit("/", "+\"a\":{ \"b\" : {} }", null, null);
         mk.commit("/", "^\"a/b/key1\": \"value1\"\n" +
@@ -249,7 +249,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void modifyParentAddPropertyAndCopy() {
         mk.commit("/", "+\"a\":{}", null, null);
         mk.commit("/", "+\"b\" : {}\n"
@@ -263,7 +263,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void removePropertyAndCopy() {
         mk.commit("/", "+\"a\":{ \"b\" : { \"key1\" : \"value1\" } }", null, null);
         mk.commit("/", "^\"a/b/key1\": null\n" +
@@ -276,7 +276,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void removeNestedPropertyAndCopy() {
         mk.commit("/", "+\"a\":{ \"key1\" : \"value1\"}", null, null);
         mk.commit("/", "^\"a/key1\" : null\n" +
@@ -289,7 +289,7 @@ public class DocumentMKCommitCopyTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void modifyParentRemovePropertyAndCopy() {
         mk.commit("/", "+\"a\":{ \"key1\" : \"value1\"}", null, null);
         mk.commit("/", "+\"b\" : {}\n"

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java Tue Mar 18 15:12:53 2014
@@ -96,7 +96,7 @@ public class DocumentMKDiffTest extends 
     @Ignore("New DocumentMK only supports depth 0")
     public void removePath() {
         // Add level1 & level1/level2
-        String rev0 = mk.commit("/", 
+        String rev0 = mk.commit("/",
                 "+\"level1\":{}" +
                 "+\"level1/level2\":{}", null, null);
         assertTrue(mk.nodeExists("/level1", null));

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKGetNodesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKGetNodesTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKGetNodesTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKGetNodesTest.java Tue Mar 18 15:12:53 2014
@@ -65,7 +65,7 @@ public class DocumentMKGetNodesTest exte
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void depthNegative() throws Exception {
         SimpleNodeScenario scenario = new SimpleNodeScenario(mk);
         scenario.create();
@@ -87,7 +87,7 @@ public class DocumentMKGetNodesTest exte
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void depthOne() throws Exception {
         SimpleNodeScenario scenario = new SimpleNodeScenario(mk);
         scenario.create();
@@ -107,7 +107,7 @@ public class DocumentMKGetNodesTest exte
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void depthLimitless() throws Exception {
         SimpleNodeScenario scenario = new SimpleNodeScenario(mk);
         scenario.create();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MeasureMemory.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MeasureMemory.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MeasureMemory.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MeasureMemory.java Tue Mar 18 15:12:53 2014
@@ -30,9 +30,9 @@ import org.junit.Test;
  * Simple test to measure how much memory a certain object uses.
  */
 public class MeasureMemory {
-    
+
     static final boolean TRACE = false;
-    
+
     static final int TEST_COUNT = 10000;
     static final int OVERHEAD = 24;
 
@@ -48,7 +48,7 @@ public class MeasureMemory {
             }
         });
     }
-    
+
     @Test
     public void node() throws Exception {
         measureMemory(new Callable<Object[]>() {
@@ -59,7 +59,7 @@ public class MeasureMemory {
             }
         });
     }
-    
+
     @Test
     public void nodeWithoutProperties() throws Exception {
         measureMemory(new Callable<Object[]>() {
@@ -92,7 +92,7 @@ public class MeasureMemory {
             }
         });
     }
-    
+
     @Test
     public void nodeChildManyChildren() throws Exception {
         measureMemory(new Callable<Object[]>() {
@@ -125,7 +125,7 @@ public class MeasureMemory {
             }
         });
     }
-    
+
     private static void measureMemory(Callable<Object[]> c) throws Exception {
         LinkedList<Object> list = new LinkedList<Object>();
         long base = getMemoryUsed();
@@ -137,7 +137,7 @@ public class MeasureMemory {
         }
         long used = getMemoryUsed() - base;
         int estimation = (int) (100 * mem / used);
-        String message = 
+        String message =
                 new Error().getStackTrace()[1].getMethodName() + "\n" +
                 "used: " + used + " calculated: " + mem + "\n" +
                 "estimation is " + estimation + "%\n";
@@ -151,7 +151,7 @@ public class MeasureMemory {
         // the list might be garbage collected too early
         list.clear();
     }
-    
+
     static DocumentNodeState generateNode(int propertyCount) {
         DocumentNodeState n = new DocumentNodeState(STORE, new String("/hello/world"),
                 new Revision(1, 2, 3));
@@ -178,7 +178,7 @@ public class MeasureMemory {
         }
         return n;
     }
-    
+
     private static long getMemoryUsed() {
         for (int i = 0; i < 10; i++) {
             System.gc();
@@ -186,5 +186,5 @@ public class MeasureMemory {
         return Runtime.getRuntime().totalMemory()
                 - Runtime.getRuntime().freeMemory();
     }
-    
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDbTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDbTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDbTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDbTest.java Tue Mar 18 15:12:53 2014
@@ -31,7 +31,7 @@ import com.mongodb.WriteConcern;
  * Test directly ran against MongoDB.
  */
 public class MongoDbTest {
-    
+
     @Test
     @Ignore
     public void manyChildNodes() {
@@ -45,28 +45,28 @@ public class MongoDbTest {
         index.put("_id", 1L);
         DBObject options = new BasicDBObject();
         // options.put("unique", Boolean.TRUE);
-        nodes.ensureIndex(index, options);  
-        
+        nodes.ensureIndex(index, options);
+
         // index on (_id, _mod):
-        // Query plan: { "cursor" : "BtreeCursor _id_1__mod_-1" , 
-        // "isMultiKey" : false , "n" : 2000 , "nscannedObjects" : 2000 , 
-        // "nscanned" : 954647 , "nscannedObjectsAllPlans" : 1907080 , 
-        // "nscannedAllPlans" : 2859727 , "scanAndOrder" : false , 
-        // "indexOnly" : true , "nYields" : 5 , "nChunkSkips" : 0 , 
+        // Query plan: { "cursor" : "BtreeCursor _id_1__mod_-1" ,
+        // "isMultiKey" : false , "n" : 2000 , "nscannedObjects" : 2000 ,
+        // "nscanned" : 954647 , "nscannedObjectsAllPlans" : 1907080 ,
+        // "nscannedAllPlans" : 2859727 , "scanAndOrder" : false ,
+        // "indexOnly" : true , "nYields" : 5 , "nChunkSkips" : 0 ,
         // "millis" : 5112 ,...
         // Time: 2229 ms
         // Count: 2000
-        
+
         // index on (_mod, _id)
-        // Query plan: { "cursor" : "BtreeCursor _mod_-1__id_1" , 
-        // "isMultiKey" : false , "n" : 2000 , "nscannedObjects" : 2000 , 
-        // "nscanned" : 2000 , "nscannedObjectsAllPlans" : 2203 , 
-        // "nscannedAllPlans" : 2203 , "scanAndOrder" : false , 
-        // "indexOnly" : true , "nYields" : 0 , "nChunkSkips" : 0 , 
+        // Query plan: { "cursor" : "BtreeCursor _mod_-1__id_1" ,
+        // "isMultiKey" : false , "n" : 2000 , "nscannedObjects" : 2000 ,
+        // "nscanned" : 2000 , "nscannedObjectsAllPlans" : 2203 ,
+        // "nscannedAllPlans" : 2203 , "scanAndOrder" : false ,
+        // "indexOnly" : true , "nYields" : 0 , "nChunkSkips" : 0 ,
         // "millis" : 3 ,...
         // Time: 43 ms
         // Count: 2000
-        
+
         int children = 1000000;
         int perInsert = 1000;
         int group = 0;
@@ -106,7 +106,7 @@ public class MongoDbTest {
         log("Count: " + count);
         db.getMongo().close();
     }
-        
+
     @Test
     @Ignore
     public void updateDocument() {
@@ -120,11 +120,11 @@ public class MongoDbTest {
         index.put("_id", 1L);
         DBObject options = new BasicDBObject();
         // options.put("unique", Boolean.TRUE);
-        nodes.ensureIndex(index, options);  
-        
+        nodes.ensureIndex(index, options);
+
         long time;
         time = System.currentTimeMillis();
-        
+
         int nodeCount = 4500;
         String parent = "/parent/node/abc";
         DBObject[] inserts = new DBObject[nodeCount];
@@ -137,11 +137,11 @@ public class MongoDbTest {
             doc.put("x", 10);
         }
         nodes.insert(inserts, WriteConcern.SAFE);
-        
+
         time = System.currentTimeMillis() - time;
         System.out.println("insert: " + time);
         time = System.currentTimeMillis();
-        
+
         for (int i = 0; i < nodeCount; i++) {
             QueryBuilder queryBuilder = QueryBuilder.start(Document.ID).is(parent + "/node" + i);
             DBObject fields = new BasicDBObject();
@@ -156,7 +156,7 @@ public class MongoDbTest {
             setUpdates.append("_mod", i);
             incUpdates.append("_counter", 1);
             unsetUpdates.append("x", "1");
-            
+
             BasicDBObject update = new BasicDBObject();
             if (!setUpdates.isEmpty()) {
                 update.append("$set", setUpdates);
@@ -170,7 +170,7 @@ public class MongoDbTest {
 
             // 1087 ms (upsert true+false, returnNew = false)
             // 1100 ms (returnNew = true)
-//            DBObject oldNode = 
+//            DBObject oldNode =
             nodes.findAndModify(query, fields,
                     null /*sort*/, false /*remove*/, update, false /*returnNew*/,
                     true /*upsert*/);
@@ -178,23 +178,23 @@ public class MongoDbTest {
             // 250 ms WriteConcern.NORMAL, NONE
             // 891 ms WriteConvern.SAFE
             // > 10 s WriteConcern.JOURNAL_SAFE, FSYNC_SAFE
-            
-//            WriteResult result = 
-//            nodes.update(query, update, /* upsert */ true, /* multi */ false, 
+
+//            WriteResult result =
+//            nodes.update(query, update, /* upsert */ true, /* multi */ false,
 //                    WriteConcern.NORMAL);
 
-            
+
         }
-        
+
         time = System.currentTimeMillis() - time;
         System.out.println("update: " + time);
         time = System.currentTimeMillis();
 
         db.getMongo().close();
     }
-    
+
     private static void log(String msg) {
         System.out.println(msg);
     }
-    
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreTest.java Tue Mar 18 15:12:53 2014
@@ -47,12 +47,12 @@ import com.mongodb.WriteResult;
  * Tests the document store.
  */
 public class MongoDocumentStoreTest {
-    
+
     private static final Logger LOG = LoggerFactory.getLogger(MongoDocumentStoreTest.class);
 
 //    private static final boolean MONGO_DB = true;
 //    private static final int NODE_COUNT = 2000;
-    
+
     private static final boolean MONGO_DB = false;
     private static final int NODE_COUNT = 10;
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoUtils.java Tue Mar 18 15:12:53 2014
@@ -40,19 +40,19 @@ public class MongoUtils {
 
     /**
      * Get a connection if available. If not available, null is returned.
-     * 
+     *
      * @return the connection or null
      */
     public static MongoConnection getConnection() {
         return getConnection(DB);
     }
-    
+
     /**
      * Get a connection if available. If not available, null is returned.
-     * 
+     *
      * @param dbName the database name
      * @return the connection or null
-     */    
+     */
     public static MongoConnection getConnection(String dbName) {
         if (exception != null) {
             return null;
@@ -68,10 +68,10 @@ public class MongoUtils {
         }
         return mongoConnection;
     }
-    
+
     /**
      * Drop all user defined collections. System collections are not dropped.
-     * 
+     *
      * @param db the connection
      */
     public static void dropCollections(DB db) {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java Tue Mar 18 15:12:53 2014
@@ -41,15 +41,15 @@ import com.mongodb.DB;
  * A simple randomized dual-instance test.
  */
 public class RandomizedClusterTest {
-    
+
     private static final boolean MONGO_DB = false;
     // private static final boolean MONGO_DB = true;
-    
+
     private static final int MK_COUNT = 2;
-    
+
     private MemoryDocumentStore ds;
     private MemoryBlobStore bs;
-    
+
     private DocumentMK[] mkList = new DocumentMK[MK_COUNT];
     private String[] revList = new String[MK_COUNT];
     @SuppressWarnings({ "unchecked", "cast" })
@@ -57,11 +57,11 @@ public class RandomizedClusterTest {
     private HashMap<Integer, List<Op>> changes = new HashMap<Integer, List<Op>>();
 
     private int opId;
-    
+
     private int mkId;
-    
+
     private StringBuilder log;
-    
+
     /**
      * The map of changes. Key: node name; value: the last operation that
      * changed the node.
@@ -75,9 +75,9 @@ public class RandomizedClusterTest {
             mkList[i] = createMK(i);
             revList[i] = mkList[i].getHeadRevision();
         }
-        HashMap<Integer, ClusterRev> revs = 
+        HashMap<Integer, ClusterRev> revs =
                 new HashMap<Integer, ClusterRev>();
-        
+
         Random r = new Random(1);
         int operations = 1000, nodeCount = 10;
         int valueCount = 10;
@@ -244,7 +244,7 @@ public class RandomizedClusterTest {
         // System.out.println(log);
         // System.out.println();
     }
-    
+
     private String getValue(int clusterId, int maxOp, String nodeName) {
         for (int i = maxOp; i >= 0; i--) {
             List<Op> ops = changes.get(i);
@@ -261,7 +261,7 @@ public class RandomizedClusterTest {
         }
         return null;
     }
-    
+
     private boolean isConflict(String node) {
         Integer change = nodeChange.get(node);
         if (change == null || !unseenChanges[mkId].contains(change)) {
@@ -269,12 +269,12 @@ public class RandomizedClusterTest {
         }
         return true;
     }
-    
+
     private void log(String msg) {
         msg = opId + ": [" + mkId + "] " + msg + "\n";
         log.append(msg);
     }
-    
+
     private void syncClusterNode() {
         for (int i = 0; i < mkList.length; i++) {
             DocumentMK mk = mkList[i];
@@ -283,7 +283,7 @@ public class RandomizedClusterTest {
         DocumentMK mk = mkList[mkId];
         mk.backgroundRead();
     }
-    
+
     private void syncAndRefreshAllClusterNodes() {
         syncClusterNode();
         for (int i = 0; i < mkList.length; i++) {
@@ -294,29 +294,29 @@ public class RandomizedClusterTest {
         }
         log("sync");
     }
-    
+
     private boolean get(int maxOp, String node) {
         String head = revList[mkId];
         return get(maxOp, node, head);
     }
-    
+
     private boolean exists(String node) {
         String head = revList[mkId];
         DocumentMK mk = mkList[mkId];
         return mk.nodeExists("/" + node, head);
     }
-        
+
     private boolean get(int maxOp, String node, String head) {
         String p = "/" + node;
         DocumentMK mk = mkList[mkId];
         String value = getValue(mkId, maxOp, node);
         if (value == null) {
-            assertFalse("path: " + p + " is supposed to not exist", 
+            assertFalse("path: " + p + " is supposed to not exist",
                     mk.nodeExists(p, head));
             return false;
         }
         if (!mk.nodeExists(p, head)) {
-            assertTrue("path: " + p + " is supposed to exist", 
+            assertTrue("path: " + p + " is supposed to exist",
                     mk.nodeExists(p, head));
         }
         String expected = "{\":childNodeCount\":0,\"x\":" + value + "}";
@@ -326,7 +326,7 @@ public class RandomizedClusterTest {
         assertEquals(expected, result);
         return true;
     }
-    
+
     private static String normalize(String json) {
         JsopTokenizer t = new JsopTokenizer(json);
         t.read('{');
@@ -352,7 +352,7 @@ public class RandomizedClusterTest {
             result = mk.commit("/", diff, rev, null);
             revList[mkId] = result;
         } else {
-            // System.out.println("--> fail " + e.toString());            
+            // System.out.println("--> fail " + e.toString());
             try {
                 mk.commit("/", diff, rev, null);
                 fail("Should fail: " + diff + " with " + ex);
@@ -369,7 +369,7 @@ public class RandomizedClusterTest {
         }
         return result;
     }
-    
+
     private DocumentMK createMK(int clusterId) {
         DocumentMK.Builder builder = new DocumentMK.Builder();
         builder.setAsyncDelay(0);
@@ -388,7 +388,7 @@ public class RandomizedClusterTest {
         }
         return builder.setClusterId(clusterId + 1).open();
     }
-    
+
     /**
      * A revision in a certain cluster node.
      */
@@ -396,7 +396,7 @@ public class RandomizedClusterTest {
         int mkId;
         String rev;
     }
-    
+
     /**
      * An operation.
      */

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java Tue Mar 18 15:12:53 2014
@@ -41,7 +41,7 @@ public class RevisionTest {
             assertTrue(r.equals(r2));
         }
     }
-    
+
     @Test
     public void difference() throws InterruptedException {
         long t0 = Revision.getCurrentTimestamp();
@@ -59,7 +59,7 @@ public class RevisionTest {
         Revision r2 = Revision.newRevision(0);
         assertTrue(Revision.getTimestampDifference(r2, r1) > 0);
     }
-    
+
     @Test
     public void equalsHashCode() {
         Revision a = Revision.newRevision(0);
@@ -89,7 +89,7 @@ public class RevisionTest {
         assertFalse(x3.equals(a));
         assertFalse(a.hashCode() == x3.hashCode());
     }
-    
+
     @Test
     public void compare() throws InterruptedException {
         Revision last = Revision.newRevision(0);
@@ -111,7 +111,7 @@ public class RevisionTest {
             }
         }
     }
-    
+
     @Test
     public void revisionComparatorSimple() {
         RevisionComparator comp = new RevisionComparator(0);
@@ -129,7 +129,7 @@ public class RevisionTest {
 
         Revision r0c1 = new Revision(0x010, 0, 1);
         Revision r0c2 = new Revision(0x010, 0, 2);
-        
+
         Revision r1c1 = new Revision(0x110, 0, 1);
         Revision r2c1 = new Revision(0x120, 0, 1);
         Revision r3c1 = new Revision(0x130, 0, 1);
@@ -205,14 +205,14 @@ public class RevisionTest {
         Revision r1c2 = new Revision(0x20, 0, 2);
         Revision r2c1 = new Revision(0x30, 0, 1);
         Revision r2c2 = new Revision(0x40, 0, 2);
-        
+
         comp.add(r1c1, new Revision(0x10, 0, 0));
         comp.add(r2c1, new Revision(0x20, 0, 0));
 
         // there's no range for c2, and therefore this
         // revision must be considered to be in the future
         assertTrue(comp.compare(r1c2, r2c1) > 0);
-        
+
         // add a range for r2r2
         comp.add(r2c2, new Revision(0x30, 0, 0));
 
@@ -253,5 +253,5 @@ public class RevisionTest {
         // within a range -> must return lower bound of next higher range
         assertEquals(new Revision(0x30, 0, 0), comp.getRevisionSeen(r21));
     }
-    
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java Tue Mar 18 15:12:53 2014
@@ -40,7 +40,7 @@ import com.mongodb.DB;
  * A set of simple tests.
  */
 public class SimpleTest {
-    
+
     private static final boolean MONGO_DB = false;
     // private static final boolean MONGO_DB = true;
 
@@ -59,7 +59,7 @@ public class SimpleTest {
         assertEquals("10:/1/2/3/3/4/6/7/8/9/a", Utils.getIdFromPath("/1/2/3/3/4/6/7/8/9/a"));
         assertEquals("/1/2/3/3/4/6/7/8/9/a", Utils.getPathFromId("10:/1/2/3/3/4/6/7/8/9/a"));
     }
-    
+
     @Test
     public void pathDepth() {
         assertEquals(0, Utils.pathDepth(""));
@@ -69,7 +69,7 @@ public class SimpleTest {
         assertEquals(2, Utils.pathDepth("/a/b"));
         assertEquals(3, Utils.pathDepth("/a/b/c"));
     }
-    
+
     @Test
     public void addNodeGetNode() {
         DocumentMK mk = new DocumentMK.Builder().open();
@@ -89,7 +89,7 @@ public class SimpleTest {
         assertEquals("Hello", p.getValue(Type.STRING));
         mk.dispose();
     }
-    
+
     @Test
     public void nodeIdentifier() {
         DocumentMK mk = createMK(true);
@@ -99,7 +99,7 @@ public class SimpleTest {
         String rev2 = mk.commit("/test", "+\"a\":{}", null, null);
         String rev3 = mk.commit("/test", "+\"b\":{}", null, null);
         String rev4 = mk.commit("/test", "^\"a/x\":1", null, null);
-        
+
         String r0 = mk.getNodes("/", rev0, 0, 0, Integer.MAX_VALUE, ":id");
         assertEquals("{\":id\":\"/@r0-0-1\",\":childNodeCount\":0}", r0);
         String r1 = mk.getNodes("/", rev1, 0, 0, Integer.MAX_VALUE, ":id");
@@ -120,10 +120,10 @@ public class SimpleTest {
         assertEquals("{\":id\":\"/test/a@r4-0-1\",\"x\":1,\":childNodeCount\":0}", r4);
         r4 = mk.getNodes("/test/b", rev4, 0, 0, Integer.MAX_VALUE, ":id");
         assertEquals("{\":id\":\"/test/b@r3-0-1\",\":childNodeCount\":0}", r4);
-        
-        mk.dispose();        
+
+        mk.dispose();
     }
-    
+
     @Test
     public void conflict() {
         DocumentMK mk = createMK();
@@ -139,17 +139,17 @@ public class SimpleTest {
         mk.commit("/", "+\"b\": {}", null, null);
         mk.dispose();
     }
-    
+
     @Test
     public void diff() {
         DocumentMK mk = createMK();
-        
+
         String rev0 = mk.getHeadRevision();
         String rev1 = mk.commit("/", "+\"t1\":{}", null, null);
         String rev2 = mk.commit("/", "+\"t2\":{}", null, null);
         String rev3 = mk.commit("/", "+\"t3\":{}", null, null);
         String rev4 = mk.commit("/", "^\"t3/x\":1", null, null);
-        
+
         String r0 = mk.getNodes("/", rev0, 0, 0, Integer.MAX_VALUE, null);
         assertEquals("{\":childNodeCount\":0}", r0);
         String r1 = mk.getNodes("/", rev1, 0, 0, Integer.MAX_VALUE, null);
@@ -158,7 +158,7 @@ public class SimpleTest {
         assertEquals("{\"t1\":{},\"t2\":{},\":childNodeCount\":2}", r2);
         String r3 = mk.getNodes("/", rev3, 0, 0, Integer.MAX_VALUE, null);
         assertEquals("{\"t1\":{},\"t2\":{},\"t3\":{},\":childNodeCount\":3}", r3);
-        
+
         String diff01 = mk.diff(rev0, rev1, "/", 0).trim();
         assertEquals("+\"/t1\":{}", diff01);
         String diff12 = mk.diff(rev1, rev2, "/", 0).trim();
@@ -202,7 +202,7 @@ public class SimpleTest {
         assertEquals("{\":childNodeCount\":0}", test2);
         mk.dispose();
     }
-    
+
     @Test
     public void move() {
         DocumentMK mk = createMK();
@@ -214,7 +214,7 @@ public class SimpleTest {
         assertNull(test);
         mk.dispose();
     }
-    
+
     @Test
     public void copy() {
         DocumentMK mk = createMK();
@@ -236,16 +236,16 @@ public class SimpleTest {
         assertEquals("{\"$x\":\"1\",\"_id\":\"a\",\"name.first\":\"Hello\",\":childNodeCount\":0}", test);
         mk.dispose();
     }
-    
+
     @Test
     public void commit() {
         DocumentMK mk = createMK();
         DocumentNodeStore ns = mk.getNodeStore();
-        
+
         String rev = mk.commit("/", "+\"test\":{\"name\": \"Hello\"}", null, null);
         String test = mk.getNodes("/test", rev, 0, 0, Integer.MAX_VALUE, null);
         assertEquals("{\"name\":\"Hello\",\":childNodeCount\":0}", test);
-        
+
         String r0 = mk.commit("/test", "+\"a\":{\"name\": \"World\"}", null, null);
         String r1 = mk.commit("/test", "+\"b\":{\"name\": \"!\"}", null, null);
         test = mk.getNodes("/test", r0, 0, 0, Integer.MAX_VALUE, null);
@@ -291,12 +291,12 @@ public class SimpleTest {
         n = ns.getNode("/testDel", Revision.fromString(r3));
         assertNull(n);
     }
-    
+
     @Test
     public void escapeUnescape() {
         DocumentMK mk = createMK();
         String rev;
-        String nodes; 
+        String nodes;
         Random r = new Random(1);
         for (int i = 0; i < 20; i++) {
             int len = 1 + r.nextInt(5);
@@ -315,7 +315,7 @@ public class SimpleTest {
             }
             JsopBuilder jsop = new JsopBuilder();
             jsop.tag('+').key(s).object().key(s).value("x").endObject();
-            rev = mk.commit("/", jsop.toString(), 
+            rev = mk.commit("/", jsop.toString(),
                     null, null);
             nodes = mk.getNodes("/" + s, rev, 0, 0, 100, null);
             jsop = new JsopBuilder();
@@ -332,15 +332,15 @@ public class SimpleTest {
             jsop = new JsopBuilder();
             jsop.tag('-').value(s);
             rev = mk.commit("/", jsop.toString(), rev, null);
-            
+
         }
     }
-    
+
     @Test
     public void nodeAndPropertyNames() {
         DocumentMK mk = createMK();
         String rev;
-        String nodes; 
+        String nodes;
         for (String s : new String[] { "_", "$", "__", "_id", "$x", ".", ".\\", "x\\", "\\x", "first.name" }) {
             String x2 = Utils.escapePropertyName(s);
             String s2 = Utils.unescapePropertyName(x2);
@@ -349,7 +349,7 @@ public class SimpleTest {
             }
             JsopBuilder jsop = new JsopBuilder();
             jsop.tag('+').key(s).object().key(s).value("x").endObject();
-            rev = mk.commit("/", jsop.toString(), 
+            rev = mk.commit("/", jsop.toString(),
                     null, null);
             nodes = mk.getNodes("/" + s, rev, 0, 0, 10, null);
             jsop = new JsopBuilder();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadGridFSTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadGridFSTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadGridFSTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadGridFSTest.java Tue Mar 18 15:12:53 2014
@@ -44,7 +44,7 @@ public class DocumentMKReadGridFSTest ex
     }
 
     @Test
-    @Ignore    
+    @Ignore
     public void large() throws Exception {
         read(20 * 1024 * 1024);
     }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/MongoBlobStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/MongoBlobStoreTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/MongoBlobStoreTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/MongoBlobStoreTest.java Tue Mar 18 15:12:53 2014
@@ -31,18 +31,18 @@ import org.junit.BeforeClass;
 public class MongoBlobStoreTest extends AbstractBlobStoreTest {
 
     private MongoConnection mongoConnection;
-    
+
     @BeforeClass
     public static void checkMongoDbAvailable() {
         Assume.assumeNotNull(MongoUtils.getConnection());
     }
-    
+
     @Before
     @Override
     public void setUp() throws Exception {
         mongoConnection = MongoUtils.getConnection();
         MongoUtils.dropCollections(mongoConnection.getDB());
-        
+
         MongoBlobStore blobStore = new MongoBlobStore(mongoConnection.getDB());
         blobStore.setBlockSize(128);
         blobStore.setBlockSizeMin(48);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/CloudStoreUtils.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/CloudStoreUtils.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/CloudStoreUtils.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/CloudStoreUtils.java Tue Mar 18 15:12:53 2014
@@ -25,7 +25,7 @@ public class CloudStoreUtils {
 
     /**
      * Gets the blob store.
-     * 
+     *
      * @return the blob store
      * @throws Exception
      *             the exception

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/MongoCloudBlobGCTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/MongoCloudBlobGCTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/MongoCloudBlobGCTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/MongoCloudBlobGCTest.java Tue Mar 18 15:12:53 2014
@@ -27,7 +27,7 @@ import org.junit.BeforeClass;
 
 /**
  * Test for MongoMK GC with {@link CloudBlobStore}
- * 
+ *
  */
 public class MongoCloudBlobGCTest extends MongoBlobGCTest {
     @BeforeClass

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/MongoDataStoreBlobGCTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/MongoDataStoreBlobGCTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/MongoDataStoreBlobGCTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/MongoDataStoreBlobGCTest.java Tue Mar 18 15:12:53 2014
@@ -30,7 +30,7 @@ import org.junit.BeforeClass;
 
 /**
  * Test for MongoMK GC with {@link DataStoreBlobStore}
- * 
+ *
  */
 public class MongoDataStoreBlobGCTest extends MongoBlobGCTest {
     @BeforeClass

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKConcurrentAddTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKConcurrentAddTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKConcurrentAddTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKConcurrentAddTest.java Tue Mar 18 15:12:53 2014
@@ -62,8 +62,8 @@ public class DocumentMKConcurrentAddTest
      * Creates NB_THREADS microkernels, each commiting two nodes (one parent,
      * one child) in its own thread. The nodes being committed by separate
      * threads do not overlap / conflict.
-     * 
-     * @throws Exception 
+     *
+     * @throws Exception
      */
     @Test
     public void testConcurrentAdd() throws Exception {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKGetRevisionHistoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKGetRevisionHistoryTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKGetRevisionHistoryTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKGetRevisionHistoryTest.java Tue Mar 18 15:12:53 2014
@@ -82,7 +82,7 @@ public class DocumentMKGetRevisionHistor
     @Test
     public void since() throws Exception {
         // To make sure there's a little delay since the initial commit.
-        Thread.sleep(100); 
+        Thread.sleep(100);
         long since1 = System.currentTimeMillis();
         int count1 = 6;
         for (int i = 0; i < count1; i++) {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java Tue Mar 18 15:12:53 2014
@@ -59,7 +59,7 @@ public class DocumentMKWaitForCommitTest
         long after = System.currentTimeMillis();
         assertEquals(headRev, rev);
         // Basically no wait.
-        assertTrue(after - before < 100); 
+        assertTrue(after - before < 100);
     }
 
     @Test
@@ -122,7 +122,7 @@ public class DocumentMKWaitForCommitTest
         assertEquals(headRev, rev);
         assertEquals(headRev, rev);
         // Basically no wait.
-        assertTrue(after - before < 10); 
+        assertTrue(after - before < 10);
     }
 
     private ScheduledFuture<String> scheduleCommit(long delay, final String revisionId) {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java Tue Mar 18 15:12:53 2014
@@ -51,5 +51,5 @@ public class SimpleNodeScenario {
     public String deleteB() throws Exception {
         return mk.commit("/a", "-\"b\"", null, "Commit with deleted /a/b");
     }
-    
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java Tue Mar 18 15:12:53 2014
@@ -41,7 +41,7 @@ public class ConcurrentWriteMultipleMkMo
 
     @Test
     // Ignored only because it takes a while to complete.
-    @Ignore 
+    @Ignore
     public void testLarge() throws Exception {
         doTest(10000);
     }
@@ -119,7 +119,7 @@ public class ConcurrentWriteMultipleMkMo
             this.diff = diff;
             this.nodesPerCommit = nodesPerCommit;
         }
-        
+
         @Override
         public String toString() {
             return id;

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java Tue Mar 18 15:12:53 2014
@@ -80,7 +80,7 @@ public class MultiTenancyTest extends Ab
      * Scenario: 3 MKs total, 2 MKs point to DB1, 1 points to DB2.
      */
     @Test
-    @Ignore    
+    @Ignore
     public void basicMultiTenancy() {
         mk1.commit("/", "+\"a\" : {}", null, null);
         assertEquals(1, mk1.getChildNodeCount("/", null));

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdateTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdateTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdateTest.java Tue Mar 18 15:12:53 2014
@@ -66,7 +66,7 @@ public class AsyncIndexUpdateTest {
      * <li>Add some content</li>
      * <li>Search & verify</li>
      * </ul>
-     * 
+     *
      */
     @Test
     public void testAsync() throws Exception {
@@ -103,7 +103,7 @@ public class AsyncIndexUpdateTest {
      * <li>Add some content</li>
      * <li>Search & verify</li>
      * </ul>
-     * 
+     *
      */
     @Test
     public void testAsyncDouble() throws Exception {
@@ -153,7 +153,7 @@ public class AsyncIndexUpdateTest {
      * <li>Add some content</li>
      * <li>Search & verify</li>
      * </ul>
-     * 
+     *
      */
     @Test
     public void testAsyncDoubleSubtree() throws Exception {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java Tue Mar 18 15:12:53 2014
@@ -64,7 +64,7 @@ public class IndexUpdateTest {
      * <li>Add some content</li>
      * <li>Search & verify</li>
      * </ul>
-     * 
+     *
      */
     @Test
     public void test() throws Exception {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java Tue Mar 18 15:12:53 2014
@@ -70,8 +70,8 @@ public class NodeTypeIndexTest {
         NodeBuilder root = store.getRoot().builder();
 
         // remove "rep:security" as it interferes with tests
-        root.getChildNode("rep:security").remove(); 
-        
+        root.getChildNode("rep:security").remove();
+
         addFolder(root, "folder-1");
         addFolder(root, "folder-2");
         addFile(root, "file-1");
@@ -137,5 +137,5 @@ public class NodeTypeIndexTest {
         return node.child(name).setProperty(
                 JcrConstants.JCR_PRIMARYTYPE, nodeType, Type.NAME);
     }
-    
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/BasicOrderedPropertyIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/BasicOrderedPropertyIndexQueryTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/BasicOrderedPropertyIndexQueryTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/BasicOrderedPropertyIndexQueryTest.java Tue Mar 18 15:12:53 2014
@@ -49,13 +49,13 @@ public abstract class BasicOrderedProper
      * the property used by the index
      */
     public static final String ORDERED_PROPERTY = "foo";
-    
+
     /**
      * number of nodes to create for testing.
-     * 
+     *
      * It has been found during development that in some cases the order of the nodes creation
      * within the persistence where the actual expected order.
-     * 
+     *
      * The higher the value the lower the chance for this to happen.
      */
     protected static final int NUMBER_OF_NODES = 50;
@@ -69,8 +69,8 @@ public abstract class BasicOrderedProper
     /**
      * generate a list of values to be used as ordered set. Will return something like
      * {@code value000, value001, value002, ...}
-     * 
-     * 
+     *
+     *
      * @param amount
      * @param direction the direction of the sorting
      * @return a list of {@code amount} values ordered as specified by {@code direction}
@@ -93,17 +93,17 @@ public abstract class BasicOrderedProper
         }
         return values;
     }
-    
+
     /**
      * as {@code generateOrderedValues(int, OrderDirection)} by forcing OrderDirection.ASC
-     * 
+     *
      * @param amount
      * @return
      */
     protected static List<String> generateOrderedValues(int amount) {
         return generateOrderedValues(amount, OrderDirection.ASC);
     }
-    
+
     /**
      * As {@link #child(Tree, String, String, String, Type)} but forces {@code String} as
      * {@code Type}.
@@ -124,7 +124,7 @@ public abstract class BasicOrderedProper
     /**
      * convenience method that adds a bunch of nodes in random order and return the order in which
      * they should be presented by the OrderedIndex
-     * 
+     *
      * @param values the values of the property that will be indexed
      * @param father the father under which add the nodes
      * @param direction the direction of the items to be added.
@@ -154,7 +154,7 @@ public abstract class BasicOrderedProper
 
     /**
      * assert the right order of the returned resultset
-     * 
+     *
      * @param orderedSequence the right order in which the resultset should be returned
      * @param resultset the resultset
      */
@@ -165,31 +165,31 @@ public abstract class BasicOrderedProper
         while (resultset.hasNext() && counter < orderedSequence.size()) {
             ResultRow row = resultset.next();
             assertEquals(
-                String.format("Wrong path at the element '%d'", counter), 
+                String.format("Wrong path at the element '%d'", counter),
                 orderedSequence.get(counter).getPath(),
                 row.getPath()
             );
             counter++;
         }
     }
-    
+
     /**
      * convenience method for generating a list of ordered dates as string in ISO
      * 8601:2000-compliant format.
-     * 
+     *
      * {@link http ://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4.3%20From%20DATE%20To}.
-     * 
+     *
      * it will add or remove depending of the {@code direction} provided, 12hrs for every entry to
      * be generated.
-     * 
-     * 
+     *
+     *
      * @param amount
      * @param direction the direction of the sorting. If null the {@code OrderDirection.ASC} will be
      *            used
      * @param start the date from which to start from in the generation
      * @return a list of {@code amount} values ordered as specified by {@code direction}
      */
-    protected static List<String> generateOrderedDates(int amount, 
+    protected static List<String> generateOrderedDates(int amount,
                                                        OrderDirection direction,
                                                        @Nonnull final Calendar start) {
         if (amount > 1000) {
@@ -208,7 +208,7 @@ public abstract class BasicOrderedProper
 
     /**
      * create a child node for the provided father
-     * 
+     *
      * @param father
      * @param name the name of the node to create
      * @param propName the name of the property to assign
@@ -217,7 +217,7 @@ public abstract class BasicOrderedProper
      * @return the just added child
      */
     @SuppressWarnings({ "unchecked", "rawtypes" })
-    static Tree child(@Nonnull Tree father, @Nonnull String name, @Nonnull String propName, 
+    static Tree child(@Nonnull Tree father, @Nonnull String name, @Nonnull String propName,
                       @Nonnull String propValue, @Nonnull Type type) {
         Tree child = father.addChild(name);
         child.setProperty(JCR_PRIMARYTYPE, NT_UNSTRUCTURED, Type.NAME);
@@ -237,13 +237,13 @@ public abstract class BasicOrderedProper
     /**
      * convenience method that adds a bunch of nodes in random order and return the order in which
      * they should be presented by the OrderedIndex
-     * 
+     *
      * @param values the values of the property that will be indexed
      * @param father the father under which add the nodes
      * @return
      */
     @SuppressWarnings({ "rawtypes", "unchecked" })
-    protected void addChildNodes(final List<String> values, 
+    protected void addChildNodes(final List<String> values,
                                  final NodeBuilder father,
                                  @Nonnull final Type propertyType) {
         Random rnd = new Random();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/MultipleIndicesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/MultipleIndicesTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/MultipleIndicesTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/MultipleIndicesTest.java Tue Mar 18 15:12:53 2014
@@ -113,7 +113,7 @@ public class MultipleIndicesTest extends
                 ImmutableList.of("/node-2"));
         assertQuery("select [jcr:path] from [nt:base] where [pid] = ':'",
                 ImmutableList.of("/node-3"));
-        
+
         setTravesalEnabled(true);
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderDirectionEnumTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderDirectionEnumTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderDirectionEnumTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderDirectionEnumTest.java Tue Mar 18 15:12:53 2014
@@ -45,7 +45,7 @@ public class OrderDirectionEnumTest {
             .setProperty(OrderedIndex.DIRECTION, OrderDirection.DESC.getDirection()).getNodeState();
         assertEquals(OrderDirection.DESC, OrderDirection.fromIndexMeta(indexMeta));
     }
-    
+
     @Test
     public void isDescending(){
         NodeState indexMeta = null;
@@ -73,7 +73,7 @@ public class OrderDirectionEnumTest {
             .setProperty(OrderedIndex.DIRECTION, OrderDirection.DESC.getDirection()).getNodeState();
         assertFalse(OrderDirection.isAscending(indexMeta));
     }
-    
+
     @Test
     public void orderedDirectionFromString() {
         assertNull("A non-existing order direction should result in null",

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndexCostTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndexCostTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndexCostTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndexCostTest.java Tue Mar 18 15:12:53 2014
@@ -47,12 +47,12 @@ public class OrderedIndexCostTest extend
     /**
      * convenience class that return an always indexed strategy
      */
-    private static class AlwaysIndexedOrderedPropertyIndex extends OrderedPropertyIndex {        
+    private static class AlwaysIndexedOrderedPropertyIndex extends OrderedPropertyIndex {
         @Override
         PropertyIndexLookup getLookup(NodeState root) {
             return new AlwaysIndexedLookup(root);
         }
-        
+
         /**
          * convenience class that always return true at the isIndexed test
          */
@@ -88,10 +88,10 @@ public class OrderedIndexCostTest extend
         root.getChildNode(IndexConstants.INDEX_DEFINITIONS_NAME).getChildNode(TEST_INDEX_NAME)
             .child(IndexConstants.INDEX_CONTENT_NODE_NAME);
     }
-    
+
     /**
      * define e descending ordered index in the provided root
-     * 
+     *
      * @param root
      * @throws IllegalArgumentException
      * @throws RepositoryException
@@ -103,7 +103,7 @@ public class OrderedIndexCostTest extend
 
     /**
      * define e Ascending ordered index in the provided root
-     * 
+     *
      * @param root
      * @throws IllegalArgumentException
      * @throws RepositoryException
@@ -126,7 +126,7 @@ public class OrderedIndexCostTest extend
         assertEquals("if it contains FullText we don't serve", Double.POSITIVE_INFINITY,
             index.getCost(filter, root), 0);
     }
-  
+
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
     public void costContainsNativeConstraints(){
         OrderedPropertyIndex index = new OrderedPropertyIndex();
@@ -141,7 +141,7 @@ public class OrderedIndexCostTest extend
 
     /**
      * tests the use-case where we ask for '>' of a date.
-     * 
+     *
      * As we're not testing the actual algorithm, part of {@code IndexLookup} we want to make sure
      * the Index doesn't reply with "dont' serve" in special cases
      */
@@ -163,11 +163,11 @@ public class OrderedIndexCostTest extend
         assertFalse("In ascending order we're expeting to serve this kind of queries",
             Double.POSITIVE_INFINITY == index.getCost(filter, root));
     }
-    
+
     /**
      * test that the '>=' use case is served from the index
-     * @throws RepositoryException 
-     * @throws IllegalArgumentException 
+     * @throws RepositoryException
+     * @throws IllegalArgumentException
      */
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
     public void costGreaterThanEqualAscendingDirection() throws IllegalArgumentException, RepositoryException {
@@ -188,11 +188,11 @@ public class OrderedIndexCostTest extend
         assertFalse("In ascending order we're expeting to serve this kind of queries",
             Double.POSITIVE_INFINITY == index.getCost(filter, root));
     }
-    
+
     /**
      * when we run a '<' in an Ascending index it should not serve it
-     * @throws RepositoryException 
-     * @throws IllegalArgumentException 
+     * @throws RepositoryException
+     * @throws IllegalArgumentException
      */
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
     public void costLessThanAscendingDirection() throws IllegalArgumentException, RepositoryException {
@@ -232,7 +232,7 @@ public class OrderedIndexCostTest extend
         assertEquals("in ascending index we're not expecting to serve '<=' queries",
             Double.POSITIVE_INFINITY, index.getCost(filter, root), 0);
     }
-    
+
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
     public void costGreaterThanDescendingDirection() throws IllegalArgumentException, RepositoryException {
         OrderedPropertyIndex index = new AlwaysIndexedOrderedPropertyIndex();
@@ -250,7 +250,7 @@ public class OrderedIndexCostTest extend
 
         assertEquals("in descending index we're not expecting to serve '>' queries",
             Double.POSITIVE_INFINITY, index.getCost(filter, root), 0);
-        
+
     }
 
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
@@ -271,7 +271,7 @@ public class OrderedIndexCostTest extend
 
         assertEquals("in descending index we're not expecting to serve '>' queries",
             Double.POSITIVE_INFINITY, index.getCost(filter, root), 0);
-        
+
     }
 
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
@@ -291,7 +291,7 @@ public class OrderedIndexCostTest extend
 
         assertFalse("In descending order we're expeting to serve this kind of queries",
             Double.POSITIVE_INFINITY == index.getCost(filter, root));
-        
+
     }
 
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
@@ -312,7 +312,7 @@ public class OrderedIndexCostTest extend
 
         assertFalse("In descending order we're expeting to serve this kind of queries",
             Double.POSITIVE_INFINITY == index.getCost(filter, root));
-        
+
     }
 
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
@@ -323,7 +323,7 @@ public class OrderedIndexCostTest extend
         NodeState root = builder.getNodeState();
         Filter filter = createNiceMock(Filter.class);
         Filter.PropertyRestriction restriction = new Filter.PropertyRestriction();
-        restriction.first = PropertyValues.newDate("2013-01-01"); 
+        restriction.first = PropertyValues.newDate("2013-01-01");
         restriction.last = PropertyValues.newDate("2013-01-02");
         restriction.firstIncluding = true;
         restriction.lastIncluding = true;
@@ -335,7 +335,7 @@ public class OrderedIndexCostTest extend
 
         assertFalse("In descending order we're expeting to serve this kind of queries",
             Double.POSITIVE_INFINITY == index.getCost(filter, root));
-        
+
     }
 
     @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
@@ -346,7 +346,7 @@ public class OrderedIndexCostTest extend
         NodeState root = builder.getNodeState();
         Filter filter = createNiceMock(Filter.class);
         Filter.PropertyRestriction restriction = new Filter.PropertyRestriction();
-        restriction.first = PropertyValues.newDate("2013-01-01"); 
+        restriction.first = PropertyValues.newDate("2013-01-01");
         restriction.last = PropertyValues.newDate("2013-01-02");
         restriction.firstIncluding = true;
         restriction.lastIncluding = true;
@@ -358,6 +358,6 @@ public class OrderedIndexCostTest extend
 
         assertFalse("In descending order we're expeting to serve this kind of queries",
             Double.POSITIVE_INFINITY == index.getCost(filter, root));
-        
+
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexDescendingQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexDescendingQueryTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexDescendingQueryTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexDescendingQueryTest.java Tue Mar 18 15:12:53 2014
@@ -53,10 +53,10 @@ public class OrderedPropertyIndexDescend
         Tree index = root.getTree("/");
         IndexUtils.createIndexDefinition(
             new NodeUtil(index.getChild(IndexConstants.INDEX_DEFINITIONS_NAME)),
-            TEST_INDEX_NAME, 
-            false, 
-            new String[] { ORDERED_PROPERTY }, 
-            null, 
+            TEST_INDEX_NAME,
+            false,
+            new String[] { ORDERED_PROPERTY },
+            null,
             OrderedIndex.TYPE,
             ImmutableMap.of(
                 OrderedIndex.DIRECTION, OrderedIndex.OrderDirection.DESC.getDirection()
@@ -64,10 +64,10 @@ public class OrderedPropertyIndexDescend
         );
         root.commit();
     }
-    
+
     /**
      * Query the index for retrieving all the entries
-     * 
+     *
      * @throws CommitFailedException
      * @throws ParseException
      * @throws RepositoryException
@@ -85,7 +85,7 @@ public class OrderedPropertyIndexDescend
             generateOrderedValues(NUMBER_OF_NODES, OrderDirection.DESC), test, OrderDirection.DESC,
             Type.STRING);
         root.commit();
-        
+
         // querying
         Iterator<? extends ResultRow> results;
         results = executeQuery(
@@ -95,10 +95,10 @@ public class OrderedPropertyIndexDescend
 
         setTravesalEnabled(true);
     }
-    
+
     /**
      * test the index for returning the items related to a single key
-     * 
+     *
      * @throws CommitFailedException
      * @throws ParseException
      */
@@ -122,8 +122,8 @@ public class OrderedPropertyIndexDescend
             PropertyValues.newString(searchfor.getValue()));
         String query = "SELECT * FROM [%s] WHERE %s=$%s";
         Iterator<? extends ResultRow> results = executeQuery(
-            String.format(query, NT_UNSTRUCTURED, ORDERED_PROPERTY, ORDERED_PROPERTY), 
-            SQL2, 
+            String.format(query, NT_UNSTRUCTURED, ORDERED_PROPERTY, ORDERED_PROPERTY),
+            SQL2,
             filter).getRows().iterator();
         assertTrue("one element is expected", results.hasNext());
         assertEquals("wrong path returned", searchfor.getPath(), results.next().getPath());
@@ -131,10 +131,10 @@ public class OrderedPropertyIndexDescend
 
         setTravesalEnabled(true);
     }
-    
+
     /**
      * test the range query in case of '>' condition
-     * @throws Exception 
+     * @throws Exception
      */
     @Test @Ignore("Disabling for now. Integration with OAK-622 and prioritising.")
     public void queryGreaterThan() throws Exception {
@@ -167,10 +167,10 @@ public class OrderedPropertyIndexDescend
 
         setTravesalEnabled(true);
     }
-    
+
     /**
      * test the range query in case of '>=' condition
-     * @throws Exception 
+     * @throws Exception
      */
     @Test @Ignore("Disabling for now. Integration with OAK-622 and prioritising.")
     public void queryGreaterEqualThan() throws Exception {
@@ -203,13 +203,13 @@ public class OrderedPropertyIndexDescend
 
         setTravesalEnabled(true);
     }
-        
+
     /**
      * test the range query in case of '<' condition
-     * 
+     *
      * in this case as we're ascending we're expecting an empty resultset with the proper
      * provider. not the lowcost one.
-     * @throws Exception 
+     * @throws Exception
      */
     @Test
     public void queryLessThan() throws Exception {
@@ -246,10 +246,10 @@ public class OrderedPropertyIndexDescend
 
     /**
      * test the range query in case of '<=' condition
-     * 
+     *
      * in this case as we're ascending we're expecting an empty resultset with the proper
      * provider. not the lowcost one.
-     * @throws Exception 
+     * @throws Exception
      */
     @Test
     public void queryLessEqualThan() throws Exception {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorTest.java?rev=1578949&r1=1578948&r2=1578949&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorTest.java Tue Mar 18 15:12:53 2014
@@ -38,7 +38,7 @@ import org.junit.Test;
  * Tests the ordered index.
  */
 public class OrderedPropertyIndexEditorTest {
-   
+
    @Test public void isProperlyConfiguredWithPropertyNames() {
       NodeBuilder definition = createNiceMock(NodeBuilder.class);
       PropertyState names = createNiceMock(PropertyState.class);
@@ -46,13 +46,13 @@ public class OrderedPropertyIndexEditorT
       expect(definition.getProperty(IndexConstants.PROPERTY_NAMES)).andReturn(names).anyTimes();
       replay(names);
       replay(definition);
-      
+
       OrderedPropertyIndexEditor ie = new OrderedPropertyIndexEditor(definition, null, null);
         assertFalse(
                 "With empty or missing property the index should not work.",
                 ie.isProperlyConfigured());
    }
-   
+
    @Test public void isProperlyConfiguredSingleValuePropertyNames() {
       NodeBuilder definition = createNiceMock(NodeBuilder.class);
       PropertyState names = createNiceMock(PropertyState.class);
@@ -61,14 +61,14 @@ public class OrderedPropertyIndexEditorT
       expect(definition.getProperty(IndexConstants.PROPERTY_NAMES)).andReturn(names).anyTimes();
       replay(names);
       replay(definition);
-      
+
       OrderedPropertyIndexEditor ie = new OrderedPropertyIndexEditor(definition, null, null);
       assertNotNull("With a correct property set 'propertyNames' can't be null", ie.getPropertyNames());
       assertEquals(1, ie.getPropertyNames().size());
       assertEquals("jcr:lastModified", ie.getPropertyNames().iterator().next());
       assertTrue("Expecting a properly configured index", ie.isProperlyConfigured());
    }
-   
+
    @Test public void multiValueProperty() {
       NodeBuilder definition = createNiceMock(NodeBuilder.class);
       PropertyState names = createNiceMock(PropertyState.class);
@@ -87,7 +87,7 @@ public class OrderedPropertyIndexEditorT
       assertEquals("jcr:lastModified", ie.getPropertyNames().iterator().next());
       assertTrue("Expecting a properly configured index", ie.isProperlyConfigured());
    }
-      
+
    @Test
    public void orderDirectionDefinitionNotSpecified() {
        final String property = "foobar";
@@ -99,7 +99,7 @@ public class OrderedPropertyIndexEditorT
        assertEquals(OrderedIndex.OrderDirection.ASC, editor.getDirection());
    }
 
-   @Test 
+   @Test
    public void orderDirectionDefinitionDescending() {
        final String property = "foobar";
        NodeBuilder definition = EmptyNodeState.EMPTY_NODE.builder();
@@ -111,7 +111,7 @@ public class OrderedPropertyIndexEditorT
         assertEquals(property, editor.getPropertyNames().iterator().next());
         assertEquals(OrderedIndex.OrderDirection.DESC, editor.getDirection());
    }
-   
+
    @Test
    public void orderDirectionUnknownDefinition() {
        final String property = "foobar";
@@ -126,7 +126,7 @@ public class OrderedPropertyIndexEditorT
                 "if we provide a non-valid definition for order the Ascending is expected",
                 OrderedIndex.OrderDirection.ASC, editor.getDirection());
     }
-   
+
    @Test
    public void strategies() {
        final String property = "foobar";