You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2023/01/10 20:58:15 UTC
[sling-org-apache-sling-jcr-repoinit] branch master updated: SLING-11737: jcr-repoinit - fix test failures on Windows (#42)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
The following commit(s) were added to refs/heads/master by this push:
new 2f486a8 SLING-11737: jcr-repoinit - fix test failures on Windows (#42)
2f486a8 is described below
commit 2f486a8b15438d7051e90f0f559bd11a68896217
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Tue Jan 10 21:58:09 2023 +0100
SLING-11737: jcr-repoinit - fix test failures on Windows (#42)
---
.../java/org/apache/sling/jcr/repoinit/SetPropertiesTest.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/test/java/org/apache/sling/jcr/repoinit/SetPropertiesTest.java b/src/test/java/org/apache/sling/jcr/repoinit/SetPropertiesTest.java
index 5c9b5f8..764763b 100644
--- a/src/test/java/org/apache/sling/jcr/repoinit/SetPropertiesTest.java
+++ b/src/test/java/org/apache/sling/jcr/repoinit/SetPropertiesTest.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
-import java.nio.file.Paths;
import java.util.UUID;
import javax.jcr.Node;
@@ -34,6 +33,7 @@ import javax.jcr.nodetype.NoSuchNodeTypeException;
import javax.jcr.nodetype.NodeType;
import org.apache.jackrabbit.api.security.user.Authorizable;
+import org.apache.jackrabbit.util.Text;
import org.apache.sling.commons.testing.jcr.RepositoryUtil;
import org.apache.sling.jcr.repoinit.impl.TestUtil;
import org.apache.sling.jcr.repoinit.impl.UserUtil;
@@ -247,8 +247,7 @@ public class SetPropertiesTest {
// create the test node
String name = UUID.randomUUID().toString();
String testPath = pathPrefix + name;
- Node parentNode = U.getAdminSession()
- .getNode(Paths.get(testPath).getParent().toString());
+ Node parentNode = U.getAdminSession().getNode(Text.getRelativeParent(testPath, 1));
parentNode.addNode(name, "slingtest:sling11293");
changeAutocreatedDefaultProperties(testPath);
}
@@ -263,8 +262,7 @@ public class SetPropertiesTest {
// create the test node
String name = UUID.randomUUID().toString();
String testPath = pathPrefix + name;
- Node parentNode = U.getAdminSession()
- .getNode(Paths.get(testPath).getParent().toString());
+ Node parentNode = U.getAdminSession().getNode(Text.getRelativeParent(testPath, 1));
parentNode.addNode(name).addMixin("slingtest:sling11293mixin");
changeAutocreatedDefaultProperties(testPath);
}