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 kw...@apache.org on 2021/08/20 11:52:54 UTC
[jackrabbit-oak] 01/01: OAK-9546 failing test for references of
moved node
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch OAK-9546-references-of-moved-nodes
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit c4da7747d6b7a0be63b09e634fd29391e2a45cf5
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Aug 20 13:52:36 2021 +0200
OAK-9546 failing test for references of moved node
---
.../apache/jackrabbit/oak/jcr/ReferencesTest.java | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ReferencesTest.java b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ReferencesTest.java
index 77261e1..0a8f4e0 100644
--- a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ReferencesTest.java
+++ b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ReferencesTest.java
@@ -58,6 +58,26 @@ public class ReferencesTest extends AbstractJCRTest {
checkReferences("refs", ref.getWeakReferences());
}
+ /**
+ * @see <a href="https://issues.apache.org/jira/browse/OAK-9546">OAK-9546</a>
+ */
+ public void testSimpleReferencesOfMovedNode() throws RepositoryException {
+ Node ref = testRootNode.addNode(nodeName2, testNodeType);
+ ref.addMixin(mixReferenceable);
+ superuser.save();
+
+ superuser.move(ref.getPath(), "/moved");
+ Node movedRef = superuser.getNode("/moved");
+
+ Node n = testRootNode.addNode(nodeName1, testNodeType);
+ n.setProperty("myref", movedRef);
+ superuser.save();
+
+ assertEquals("ref", movedRef.getPath(), n.getProperty("myref").getNode().getPath());
+ checkReferences("refs", movedRef.getReferences(), n.getPath() + "/myref");
+ checkReferences("refs", movedRef.getWeakReferences());
+ }
+
public void testSimpleWeakReferences() throws RepositoryException {
Node ref = testRootNode.addNode(nodeName2, testNodeType);
ref.addMixin(mixReferenceable);