This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag 
org.apache.sling.testing.sling-mock-oak-1.0.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock-oak.git

commit 82ac036b7bef786ea8068e92344260349c1d0bca
Author: Stefan Seifert <[email protected]>
AuthorDate: Wed Sep 9 10:22:46 2015 +0000

    SLING-5007 realx unit test to test root path child listing in 
sling-mock-jackrabbit and sling-mock-jackrabbit and sling-mock-oak because in 
real repositories multiple root test nodes may be created in parallel, or nodes 
already exist
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-oak@1701971
 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                |  4 ++--
 .../oak/resource/SlingCrudResourceResolverTest.java    | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index c74fa28..5135d42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,14 +50,14 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.4.0</version>
+            <version>1.5.1-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
     
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.4.0</version>
+            <version>1.5.1-SNAPSHOT</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>
diff --git 
a/src/test/java/org/apache/sling/testing/mock/sling/oak/resource/SlingCrudResourceResolverTest.java
 
b/src/test/java/org/apache/sling/testing/mock/sling/oak/resource/SlingCrudResourceResolverTest.java
index ec7755c..9519dd6 100644
--- 
a/src/test/java/org/apache/sling/testing/mock/sling/oak/resource/SlingCrudResourceResolverTest.java
+++ 
b/src/test/java/org/apache/sling/testing/mock/sling/oak/resource/SlingCrudResourceResolverTest.java
@@ -18,17 +18,23 @@
  */
 package org.apache.sling.testing.mock.sling.oak.resource;
 
+import static org.junit.Assert.assertFalse;
+
 import java.io.IOException;
+import java.util.List;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.commons.testing.jcr.RepositoryUtil;
 import org.apache.sling.testing.mock.sling.MockSling;
 import org.apache.sling.testing.mock.sling.ResourceResolverType;
 import 
org.apache.sling.testing.mock.sling.resource.AbstractSlingCrudResourceResolverTest;
 
+import com.google.common.collect.Lists;
+
 public class SlingCrudResourceResolverTest extends 
AbstractSlingCrudResourceResolverTest {
 
     @Override
@@ -52,4 +58,16 @@ public class SlingCrudResourceResolverTest extends 
AbstractSlingCrudResourceReso
         return resolver;
     }
 
+    @Override
+    public void testListChildren_RootNode() throws IOException {
+        Resource resource1 = resourceResolver.getResource("/");
+
+        // relax test conditions to check only for none-empty because in real 
repository multiple test notes may be created in parallel
+        List<Resource> children = Lists.newArrayList(resource1.listChildren());
+        assertFalse(children.isEmpty());
+
+        children = Lists.newArrayList(resource1.getChildren());
+        assertFalse(children.isEmpty());
+    }
+    
 }

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to