Author: bdelacretaz
Date: Mon Mar 15 09:22:24 2010
New Revision: 923127
URL: http://svn.apache.org/viewvc?rev=923127&view=rev
Log:
SLING-1439 - Readyness timeout in launchpad/testing should be configurable
Modified:
sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java
sling/trunk/launchpad/testing/pom.xml
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=923127&r1=923126&r2=923127&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
Mon Mar 15 09:22:24 2010
@@ -68,6 +68,8 @@ public class HttpTestBase extends TestCa
public static final String EXECUTE_RESOURCE_TYPE = "SlingTesting" +
HttpTestBase.class.getSimpleName();
private static int executeCounter;
+ public static final int READY_TIMEOUT_SECONDS =
Integer.getInteger("HttpTestBase.readyTimeoutSeconds", 60);
+
protected SlingIntegrationTestClient testClient;
protected HttpClient httpClient;
@@ -162,12 +164,12 @@ public class HttpTestBase extends TestCa
}
slingStartupOk = false;
- System.err.println("Checking if the required Sling services are
started...");
+ System.err.println("Checking if the required Sling services are
started (timeout " + READY_TIMEOUT_SECONDS + " seconds)...");
System.err.println("(base URLs=" + HTTP_BASE_URL + " and " +
WEBDAV_BASE_URL + ")");
// Try creating a node on server, every 500msec, until ok, with timeout
final List<String> exceptionMessages = new LinkedList<String>();
- final long maxMsecToWait = 60 * 1000L;
+ final long maxMsecToWait = READY_TIMEOUT_SECONDS * 1000L;
final long startupTime = System.currentTimeMillis();
while(!slingStartupOk && (System.currentTimeMillis() < startupTime +
maxMsecToWait) ) {
Modified: sling/trunk/launchpad/testing/pom.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/pom.xml?rev=923127&r1=923126&r2=923127&view=diff
==============================================================================
--- sling/trunk/launchpad/testing/pom.xml (original)
+++ sling/trunk/launchpad/testing/pom.xml Mon Mar 15 09:22:24 2010
@@ -47,6 +47,9 @@
<!-- HTTP port to use when running mvn jetty:run -->
<jetty.http.port>8888</jetty.http.port>
+ <!-- Timeout when checking for Sling readyness before starting tests
-->
+ <HttpTestBase.readyTimeoutSeconds>62</HttpTestBase.readyTimeoutSeconds>
+
<!-- path suffix for HTTP access to Sling -->
<http.base.path />
@@ -244,6 +247,12 @@
http://${test.host}:${http.port}/${webdav.workspace.path}
</value>
</property>
+ <property>
+ <name>HttpTestBase.readyTimeoutSeconds</name>
+ <value>
+ ${HttpTestBase.readyTimeoutSeconds}
+ </value>
+ </property>
</systemProperties>
</configuration>
</plugin>
@@ -320,7 +329,12 @@
http://${test.host}:${http.port}/${project.build.finalName}/${webdav.workspace.path}
</value>
</property>
-
+ <property>
+
<name>HttpTestBase.readyTimeoutSeconds</name>
+ <value>
+
${HttpTestBase.readyTimeoutSeconds}
+ </value>
+ </property>
</systemProperties>
</configuration>
</execution>