jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1515336 - in /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak: core/RootFuzzIT.java kernel/NodeStoreTest.java
Date Mon, 19 Aug 2013 10:06:50 GMT
Author: mduerig
Date: Mon Aug 19 10:06:50 2013
New Revision: 1515336

URL: http://svn.apache.org/r1515336
Log:
OAK-965: SegmentNodeState.equals fails with IllegalArgumentException
Test case

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootFuzzIT.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootFuzzIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootFuzzIT.java?rev=1515336&r1=1515335&r2=1515336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootFuzzIT.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootFuzzIT.java
Mon Aug 19 10:06:50 2013
@@ -129,7 +129,7 @@ public class RootFuzzIT {
         // FIXME fails on MongoMK due. See OAK-962
         assumeTrue(fixture != NodeStoreFixture.MONGO_MK || EXECUTE_MONGO_MK);
 
-        // FIXME fails on SegmentMK. Needs further analysis
+        // FIXME fails on SegmentMK. See OAK-965
         assumeTrue(fixture != NodeStoreFixture.SEGMENT_MK || EXECUTE_SEGMENT_MK);
 
         for (Operation op : operations(OP_COUNT)) {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java?rev=1515336&r1=1515335&r2=1515336&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/NodeStoreTest.java
Mon Aug 19 10:06:50 2013
@@ -331,6 +331,32 @@ public class NodeStoreTest {
     }
 
     @Test
+    public void oak965() throws CommitFailedException {
+        // FIXME this fails on SegmentMK. See OAK-965
+        assumeTrue(fixture != NodeStoreFixture.SEGMENT_MK);
+
+        NodeStore store1 = init(fixture.createNodeStore());
+        NodeStore store2 = init(fixture.createNodeStore());
+        try {
+            NodeState tree1 = store1.getRoot();
+            NodeState tree2 = store2.getRoot();
+            tree1.equals(tree2);
+        } finally {
+            fixture.dispose(store1);
+            fixture.dispose(store2);
+        }
+    }
+
+    private static NodeStore init(NodeStore store) throws CommitFailedException {
+        NodeStoreBranch branch = store.branch();
+        NodeBuilder builder = branch.getHead().builder();
+        builder.setChildNode("root");
+        branch.setRoot(builder.getNodeState());
+        branch.merge(EmptyHook.INSTANCE, PostCommitHook.EMPTY);
+        return store;
+    }
+
+    @Test
     public void compareAgainstBaseState0() throws CommitFailedException {
         compareAgainstBaseState(0);
     }



Mime
View raw message