Author: ivol37 at gmail.com
Date: Wed Dec 1 08:45:55 2010
New Revision: 457
Log:
[AMDATU-189] Changed waitForUrl check since apparently the check didn't work 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 08:45:55 2010
@@ -157,9 +157,10 @@
public void testFilter() throws Exception {
initialize();
- // Wait until the http service is available, for a maximum of 5 seconds
- if (!ConfigProvider.waitForURL(new URL(m_baseUrl),
HttpStatus.SC_NOT_FOUND, 5000)) {
- throw new IllegalArgumentException("URL " + m_baseUrl + " is
unreachable");
+ // Wait until the test servlet is available, for a maximum of 5 seconds
+ String url = m_baseUrl + SERVLET_ALIAS;
+ if (!ConfigProvider.waitForURL(new URL(url), HttpStatus.SC_OK, 5000)) {
+ throw new IllegalArgumentException("URL " + url + " is
unreachable");
}
// Wait for two seconds such that the Felix whiteboard service has the
time to receive the filter added
@@ -169,7 +170,7 @@
// Our filter should be registered, use httpclient to do a GET
request. The filter should
// set some response header and we check if this header has been set
HttpClient httpClient = new HttpClient();
- String url = m_baseUrl + SERVLET_ALIAS;
+
m_logService.log(LogService.LOG_DEBUG, "Testing filter bound to " +
url);
HttpMethod method = new GetMethod(url);
try {
@@ -205,9 +206,10 @@
public void testJsp() throws Exception {
initialize();
- // Wait until the http service is available, for a maximum of 5 seconds
- if (!ConfigProvider.waitForURL(new URL(m_baseUrl),
HttpStatus.SC_NOT_FOUND, 5000)) {
- throw new IllegalArgumentException("URL " + m_baseUrl + " is
unreachable");
+ // Wait until the JSP servlet is available, for a maximum of 5 seconds
+ String url = m_baseUrl + "/" + RESOURCE_ID + "/jsp/test.jsp";
+ if (!ConfigProvider.waitForURL(new URL(url), HttpStatus.SC_OK, 5000)) {
+ throw new IllegalArgumentException("URL " + url + " is
unreachable");
}
// Wait for two seconds such that the Felix whiteboard service has the
time to receive the filter added
@@ -217,7 +219,6 @@
// Our filter should be registered, use httpclient to do a GET
request. The filter should
// set some response header and we check if this header has been set
HttpClient httpClient = new HttpClient();
- String url = m_baseUrl + "/" + RESOURCE_ID + "/jsp/test.jsp";
m_logService.log(LogService.LOG_DEBUG, "Testing JSP registered on " +
url);
HttpMethod method = new GetMethod(url);
try {