incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1376843 - /sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceListenerTest.java
Date Fri, 24 Aug 2012 07:20:19 GMT
Author: cziegeler
Date: Fri Aug 24 07:20:19 2012
New Revision: 1376843

URL: http://svn.apache.org/viewvc?rev=1376843&view=rev
Log:
Make sure to register sling nodetypes before running the test

Modified:
    sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceListenerTest.java

Modified: sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceListenerTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceListenerTest.java?rev=1376843&r1=1376842&r2=1376843&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceListenerTest.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceListenerTest.java
Fri Aug 24 07:20:19 2012
@@ -34,6 +34,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.commons.testing.jcr.EventHelper;
 import org.apache.sling.commons.testing.jcr.RepositoryTestBase;
+import org.apache.sling.commons.testing.jcr.RepositoryUtil;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResource;
 import org.osgi.service.event.Event;
 import org.osgi.service.event.EventAdmin;
@@ -48,6 +49,21 @@ public class JcrResourceListenerTest ext
 
     private String pathToModify;
 
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        RepositoryUtil.startRepository();
+        final Session adminSession = RepositoryUtil.getRepository().loginAdministrative(null);
+        RepositoryUtil.registerSlingNodeTypes(adminSession);
+        adminSession.logout();
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        RepositoryUtil.stopRepository();
+    }
+
     public void testDefaultWorkspace() throws Exception {
         List<Event> events = generateEvents(null);
 



Mime
View raw message