incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1560022 - /sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/sling/SlingTestBase.java
Date Tue, 21 Jan 2014 14:11:11 GMT
Author: bdelacretaz
Date: Tue Jan 21 14:11:11 2014
New Revision: 1560022

URL: http://svn.apache.org/r1560022
Log:
SLING-3328 - simplify testing against an existing Sling instance. Patch contributed by  Jörg
Hoh, thanks!

Modified:
    sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/sling/SlingTestBase.java

Modified: sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/sling/SlingTestBase.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/sling/SlingTestBase.java?rev=1560022&r1=1560021&r2=1560022&view=diff
==============================================================================
--- sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/sling/SlingTestBase.java
(original)
+++ sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/sling/SlingTestBase.java
Tue Jan 21 14:11:11 2014
@@ -74,22 +74,22 @@ public class SlingTestBase {
 
     /** Get configuration but do not start server yet, that's done on demand */
     public SlingTestBase() {
-        if(jarExecutor == null) {
-            synchronized(this) {
-                try {
-                    jarExecutor = new JarExecutor(System.getProperties());
-                } catch(Exception e) {
-                    log.error("JarExecutor setup failed", e);
-                    fail("JarExecutor setup failed: " + e);
-                }
-            }
-        }
 
         final String configuredUrl = System.getProperty(TEST_SERVER_URL_PROP, System.getProperty("launchpad.http.server.url"));
         if(configuredUrl != null) {
             serverBaseUrl = configuredUrl;
             serverStarted = true;
         } else {
+            if(jarExecutor == null) {
+                synchronized(this) {
+                    try {
+                        jarExecutor = new JarExecutor(System.getProperties());
+                    } catch(Exception e) {
+                        log.error("JarExecutor setup failed", e);
+                        fail("JarExecutor setup failed: " + e);
+                    }
+                }
+            }
             String serverHost = System.getProperty(SERVER_HOSTNAME_PROP);
             if(serverHost == null || serverHost.trim().length() == 0) {
                 serverHost = "localhost";



Mime
View raw message