[jboss-cvs] JBossAS SVN: r59192 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Dec 21 07:33:32 EST 2006
Author: dimitris at jboss.org
Date: 2006-12-21 07:33:29 -0500 (Thu, 21 Dec 2006)
New Revision: 59192
Modified:
branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/BaseTest.java
Log:
fix the build after the commons-httpclient update
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/BaseTest.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/BaseTest.java 2006-12-21 12:02:20 UTC (rev 59191)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/BaseTest.java 2006-12-21 12:33:29 UTC (rev 59192)
@@ -37,8 +37,7 @@
* @author Ben Wang
* @version $Revision: 1.0
*/
-public abstract class BaseTest
- extends JBossClusteredTestCase
+public abstract class BaseTest extends JBossClusteredTestCase
{
/**
* Standard number of ms to pause between http requests
@@ -114,8 +113,17 @@
assertTrue("Get OK with url: " +url + " responseCode: " +responseCode
, responseCode == HttpURLConnection.HTTP_OK);
- // Read the response body.
- byte[] responseBody = method.getResponseBody();
+ byte[] responseBody = null;
+ try
+ {
+ // Read the response body.
+ responseBody = method.getResponseBody();
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ fail("HttpClient getResponseBody fails." + e.toString());
+ }
// Release the connection.
// method.releaseConnection();
@@ -151,8 +159,17 @@
assertTrue("Should not be OK code with url: " +url + " responseCode: " +responseCode
, responseCode != HttpURLConnection.HTTP_OK);
- // Read the response body.
- byte[] responseBody = method.getResponseBody();
+ byte[] responseBody = null;
+ try
+ {
+ // Read the response body.
+ responseBody = method.getResponseBody();
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ fail("HttpClient getResponseBody fails." + e.toString());
+ }
// Release the connection.
// method.releaseConnection();
@@ -190,8 +207,18 @@
assertTrue("Get OK with url: " +url + " responseCode: " +responseCode
, responseCode == HttpURLConnection.HTTP_OK);
- // Read the response body.
- byte[] responseBody = method.getResponseBody();
+ byte[] responseBody = null;
+ try
+ {
+ // Read the response body.
+ responseBody = method.getResponseBody();
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ fail("HttpClient getResponseBody fails." + e.toString());
+ }
+
/* Validate that the attribute was actually seen. An absence of the
header is treated as true since there are pages used that done't
add it.
More information about the jboss-cvs-commits
mailing list