jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1468966 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
Date Wed, 17 Apr 2013 15:21:03 GMT
Author: mduerig
Date: Wed Apr 17 15:21:02 2013
New Revision: 1468966

URL: http://svn.apache.org/r1468966
Log:
OAK-782: MemoryNodeBuilder.setNode() loses property values
@Ignored test demonstrating the issue

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java?rev=1468966&r1=1468965&r2=1468966&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
Wed Apr 17 15:21:02 2013
@@ -198,6 +198,28 @@ public class MemoryNodeBuilderTest {
     }
 
     @Test
+    @Ignore("OAK-782")
+    public void setNodeTest() {
+        MemoryNodeBuilder rootBuilder = new MemoryNodeBuilder(EmptyNodeState.EMPTY_NODE);
+        MemoryNodeBuilder aBuilder = new MemoryNodeBuilder(EmptyNodeState.EMPTY_NODE);
+        aBuilder.child("b").setProperty("c", "cValue");
+        rootBuilder.setNode("a", aBuilder.getNodeState());
+
+// Note: using the following way to construct the initial state makes the test pass
+//        rootBuilder = new MemoryNodeBuilder(EmptyNodeState.EMPTY_NODE);
+//        rootBuilder.child("a").child("b").setProperty("c", "cValue");
+
+        NodeState b = rootBuilder.getNodeState().getChildNode("a").getChildNode("b");
+        assertTrue(b.hasProperty("c"));
+
+        rootBuilder.child("a").child("b").setProperty("c2", "c2Value");
+
+        b = rootBuilder.getNodeState().getChildNode("a").getChildNode("b");
+        assertTrue(b.hasProperty("c"));
+        assertTrue(b.hasProperty("c2"));
+    }
+
+    @Test
     public void assertion_OAK781() {
         MemoryNodeBuilder rootBuilder = new MemoryNodeBuilder(EmptyNodeState.EMPTY_NODE);
         rootBuilder.child("a").setNode("b", createBC(false));



Mime
View raw message