You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2012/09/09 06:02:13 UTC

svn commit: r1382396 - /sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java

Author: cziegeler
Date: Sun Sep  9 04:02:13 2012
New Revision: 1382396

URL: http://svn.apache.org/viewvc?rev=1382396&view=rev
Log:
SLING-2595 : Tests should not check if the server is ready

Modified:
    sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java

Modified: sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java?rev=1382396&r1=1382395&r2=1382396&view=diff
==============================================================================
--- sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java (original)
+++ sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java Sun Sep  9 04:02:13 2012
@@ -45,6 +45,10 @@ import org.slf4j.MDC;
 
 /** Base class for HTTP-based Sling Launchpad integration tests */
 public class HttpTestBase extends TestCase {
+
+    /** If this system property is set, the startup check is skipped. */
+    public static final String PROPERTY_SKIP_STARTUP_CHECK = "launchpad.skip.startupcheck";
+
     public static final String HTTP_BASE_URL = removeEndingSlash(System.getProperty("launchpad.http.server.url", "http://localhost:8888"));
     public static final String WEBDAV_BASE_URL = removeEndingSlash(System.getProperty("launchpad.webdav.server.url", "http://localhost:8888"));
     public static final String SERVLET_CONTEXT = removeEndingSlash(System.getProperty("launchpad.servlet.context", ""));
@@ -120,7 +124,7 @@ public class HttpTestBase extends TestCa
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        
+
         MDC.put("testclass", getClass().getName());
         MDC.put("testcase", getName());
 
@@ -155,7 +159,7 @@ public class HttpTestBase extends TestCa
     protected void tearDown() throws Exception {
         MDC.remove("testcase");
         MDC.remove("testclass");
-        
+
         super.tearDown();
 
         for(String url : urlsToDelete) {
@@ -177,6 +181,10 @@ public class HttpTestBase extends TestCa
             }
             fail("Sling services not available. Already checked in earlier tests.");
         }
+        if ( System.getProperty(PROPERTY_SKIP_STARTUP_CHECK) != null ) {
+            slingStartupOk = true;
+            return;
+        }
         slingStartupOk = false;
 
         System.err.println("Checking if the required Sling services are started (timeout " + READY_TIMEOUT_SECONDS + " seconds)...");