[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/errors ...
Tom Elrod
tom.elrod at jboss.com
Mon Jul 24 01:17:35 EDT 2006
User: telrod
Date: 06/07/24 01:17:34
Modified: src/tests/org/jboss/test/remoting/transport/http/errors
ErrorHTTPInvokerTestClient.java
Log:
JBREM-544 - per jira issue, changing behavior of how exceptions are handled with http clients.
Revision Changes Path
1.4 +6 -6 JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/errors/ErrorHTTPInvokerTestClient.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ErrorHTTPInvokerTestClient.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/http/errors/ErrorHTTPInvokerTestClient.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ErrorHTTPInvokerTestClient.java 21 May 2006 04:47:32 -0000 1.3
+++ ErrorHTTPInvokerTestClient.java 24 Jul 2006 05:17:34 -0000 1.4
@@ -25,6 +25,7 @@
import junit.framework.TestCase;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.transport.http.WebServerError;
import org.jboss.test.remoting.transport.web.WebInvocationHandler;
import java.util.HashMap;
@@ -68,15 +69,14 @@
metadata.put("HEADER", headerProps);
- Object response = remotingClient.invoke(WebInvocationHandler.THROW_EXCEPTION_PARAM, metadata);
- if(response instanceof Exception)
+ try
{
- System.out.println("Got response: " + response + " as expected.");
- assertEquals(ErrorHTTPInvokerTestServer.EXCEPTION_MSG, ((Exception) response).getMessage());
+ Object response = remotingClient.invoke(WebInvocationHandler.THROW_EXCEPTION_PARAM, metadata);
+ assertTrue("Did not get exception thrown as expected.", false);
}
- else
+ catch(WebServerError wse)
{
- assertTrue("Response not instance of ErrorHTTPInvokerTestServer, but " + response + " instead", false);
+ assertTrue("Caught exception as expected", true);
}
}
catch(Throwable throwable)
More information about the jboss-cvs-commits
mailing list