This is an automated email from the ASF dual-hosted git repository.
baedke pushed a commit to branch issue/oak-10642
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/issue/oak-10642 by this push:
new 6224ecab9c OAK-10642: Add tests for operations on very large ordered
collections
6224ecab9c is described below
commit 6224ecab9cf555f50874966263abf7b06acd35f3
Author: Manfred Baedke <[email protected]>
AuthorDate: Fri Feb 9 14:44:16 2024 +0100
OAK-10642: Add tests for operations on very large ordered collections
Testing repeated reordering in a long running transaction.
---
.../org/apache/jackrabbit/oak/jcr/ManyChildrenIT.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ManyChildrenIT.java
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ManyChildrenIT.java
index a2bb7c0fa6..7d075544f9 100644
--- a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ManyChildrenIT.java
+++ b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ManyChildrenIT.java
@@ -26,6 +26,8 @@ import javax.jcr.Session;
import org.apache.jackrabbit.oak.fixture.NodeStoreFixture;
import org.junit.Test;
+import java.util.UUID;
+
/**
* Test nodes with many child nodes.
*/
@@ -77,4 +79,18 @@ public class ManyChildrenIT extends AbstractRepositoryTest {
writer.save();
assertTrue(test.hasNode("node-x"));
}
+
+ @Test
+ public void moveOrderableWithManyChildren() throws Exception {
+ int max = 100;
+ Session session = getAdminSession();
+ Node test = session.getRootNode().addNode("test-0", "nt:unstructured");
+ session.save();
+ for (int k = 0; k < max; k++) {
+ Node node = test.addNode(UUID.randomUUID().toString(),
"nt:unstructured");
+ test.orderBefore(node.getName(), null);
+ session.move("/test-" + k, "/test-" + (k + 1));
+ }
+ session.save();
+ }
}