Propchange: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/JcrResourceResolverTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/JcrResourceResolverTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Added: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/SynchronousJcrResourceListener.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/SynchronousJcrResourceListener.java?rev=1378407&view=auto
==============================================================================
--- 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/SynchronousJcrResourceListener.java
 (added)
+++ 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/SynchronousJcrResourceListener.java
 Wed Aug 29 00:47:03 2012
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations 
under
+ * the License.
+ */
+package org.apache.sling.launchpad.local.integrationtest;
+
+import javax.jcr.RepositoryException;
+
+import junitx.util.PrivateAccessor;
+
+import org.apache.jackrabbit.core.observation.SynchronousEventListener;
+import org.apache.sling.api.resource.LoginException;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.apache.sling.jcr.resource.internal.JcrResourceListener;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * This class is used to ensure that events are handled during the test.
+ *
+ * TODO - Ideally, this wouldn't be necessary, but EventHelper doesn't seem
+ * to be working 100% of the time.
+ *
+ */
+public class SynchronousJcrResourceListener extends JcrResourceListener 
implements SynchronousEventListener {
+
+    public SynchronousJcrResourceListener(
+            ResourceResolverFactory factory,
+            SlingRepository repo,
+            BundleContext bundleContext,
+            final ResourceResolver resolver,
+            final ServiceTracker tracker)
+            throws LoginException, RepositoryException, NoSuchFieldException {
+        super("/", null, repo, bundleContext);
+        PrivateAccessor.setField(this, "resourceResolver", resolver);
+        PrivateAccessor.setField(this, "eventAdminTracker", tracker);
+    }
+
+    public void dispose() {
+        this.deactivate();
+    }
+}

Propchange: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/SynchronousJcrResourceListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/local/integrationtest/SynchronousJcrResourceListener.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: sling/trunk/launchpad/testing/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/pom.xml?rev=1378407&r1=1378406&r2=1378407&view=diff
==============================================================================
--- sling/trunk/launchpad/testing/pom.xml (original)
+++ sling/trunk/launchpad/testing/pom.xml Wed Aug 29 00:47:03 2012
@@ -547,5 +547,10 @@
             <artifactId>servlet-api</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

Modified: 
sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/testing/TestAll.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/testing/TestAll.java?rev=1378407&r1=1378406&r2=1378407&view=diff
==============================================================================
--- 
sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/testing/TestAll.java
 (original)
+++ 
sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/testing/TestAll.java
 Wed Aug 29 00:47:03 2012
@@ -51,7 +51,7 @@ public class TestAll extends TestCase {
         // Get the URLs
         final URL[] urls = ((URLClassLoader) sysClassLoader).getURLs();
         final String testPattern = System.getProperty("integrationTestPattern",
-            "**/launchpad/webapp/integrationtest/**/*Test");
+            "**/launchpad/*/integrationtest/**/*Test");
         final String testRegex = convertToRegex(testPattern);
         final Pattern pattern = Pattern.compile(testRegex);
         for (URL u : urls) {


Reply via email to