[jboss-cvs] JBossAS SVN: r108368 - branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 28 13:02:13 EDT 2010


Author: pferraro
Date: 2010-09-28 13:02:13 -0400 (Tue, 28 Sep 2010)
New Revision: 108368

Modified:
   branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/CrossContextCallsTestCase.java
Log:
Use more informative assertEquals(...), instead of assertTrue(...).

Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/CrossContextCallsTestCase.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/CrossContextCallsTestCase.java	2010-09-28 16:48:10 UTC (rev 108367)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/CrossContextCallsTestCase.java	2010-09-28 17:02:13 UTC (rev 108368)
@@ -82,8 +82,7 @@
          e.printStackTrace();
          fail("HttpClient executeMethod fails." +e.toString());
       }
-      assertTrue("Get OK with url: " +url + " responseCode: " +responseCode
-        , responseCode == HttpURLConnection.HTTP_OK);
+      assertEquals("Get OK with url: " +url, HttpURLConnection.HTTP_OK, responseCode);
       
       String response = extractResponse(method);
    
@@ -117,15 +116,13 @@
       try
       {
          HttpState state = client.getState();
-         responseCode = client.executeMethod(method.getHostConfiguration(),
-            method, state);
+         responseCode = client.executeMethod(method.getHostConfiguration(), method, state);
       } catch (IOException e)
       {
          e.printStackTrace();
          fail("HttpClient executeMethod fails." +e.toString());
       }
-      assertTrue("Get OK with url: " +url + " responseCode: " +responseCode, 
-                 responseCode == HttpURLConnection.HTTP_OK);
+      assertEquals("Get OK with url: " +url, HttpURLConnection.HTTP_OK, responseCode);
       
       String response = extractResponse(method);
    
@@ -165,7 +162,5 @@
       //   method.releaseConnection();
       
       return result;
-      
    }
-
 }



More information about the jboss-cvs-commits mailing list