Author: ivol37 at gmail.com
Date: Wed Dec 1 11:01:29 2010
New Revision: 461
Log:
[AMDATU-189] More error logging to identify problem on Bamboo
Modified:
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java
Modified:
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java
==============================================================================
---
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java
(original)
+++
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java
Wed Dec 1 11:01:29 2010
@@ -69,7 +69,7 @@
private final static String TEST_HEADER_AFTER_VALUE = "after";
private final static String TEST_JSP_CONTENT = "<html><body>Test JSP
body</body></html>";
- private final static int TIMEOUT = 10000;
+ private final static int TIMEOUT = 120000;
private volatile LogService m_logService;
private volatile HttpContextServiceFactory m_httpContextFactoryService;
@@ -163,8 +163,15 @@
// Wait until the test servlet is available, for a maximum of 5 seconds
String url = m_baseUrl + SERVLET_ALIAS;
- m_logService.log(LogService.LOG_DEBUG, "Start waiting for url '" + url
+ "' te become available, timeout= " + TIMEOUT + "...");
+ m_logService.log(LogService.LOG_DEBUG, "Start waiting for url '" + url
+ "' to become available, timeout= " + TIMEOUT + "...");
if (!ConfigProvider.waitForURL(new URL(url), HttpStatus.SC_OK,
TIMEOUT)) {
+ String testUrl = "http://localhost:8080" + SERVLET_ALIAS;
+ try {
+ m_logService.log(LogService.LOG_ERROR, "Check URL " + testUrl
+ " returns response code " + ConfigProvider.checkURL(new URL(testUrl)));
+ }
+ catch (Exception e) {
+ m_logService.log(LogService.LOG_ERROR, "Check URL " + testUrl
+ " throws exception", e);
+ }
throw new IllegalArgumentException("URL " + url + " returns
response code " + ConfigProvider.checkURL(new URL(url)));
}
@@ -213,8 +220,15 @@
// Wait until the JSP servlet is available, for a maximum of 5 seconds
String url = m_baseUrl + "/" + RESOURCE_ID + "/jsp/test.jsp";
- m_logService.log(LogService.LOG_DEBUG, "Start waiting for url '" + url
+ "' te become available, timeout= " + TIMEOUT + "...");
+ m_logService.log(LogService.LOG_DEBUG, "Start waiting for url '" + url
+ "' to become available, timeout= " + TIMEOUT + "...");
if (!ConfigProvider.waitForURL(new URL(url), HttpStatus.SC_OK,
TIMEOUT)) {
+ String testUrl = "http://localhost:8080" + "/" + RESOURCE_ID +
"/jsp/test.jsp";
+ try {
+ m_logService.log(LogService.LOG_ERROR, "Check URL " + testUrl
+ " returns response code " + ConfigProvider.checkURL(new URL(testUrl)));
+ }
+ catch (Exception e) {
+ m_logService.log(LogService.LOG_ERROR, "Check URL " + testUrl
+ " throws exception", e);
+ }
throw new IllegalArgumentException("URL " + url + " returns
response code " + ConfigProvider.checkURL(new URL(url)));
}