Author: ron.sigal(a)jboss.com
Date: 2008-10-29 16:57:19 -0400 (Wed, 29 Oct 2008)
New Revision: 4634
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/proxy/ProxyAuthenticationTestCase.java
Log:
JBREM-1051: Minor changes.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/proxy/ProxyAuthenticationTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/proxy/ProxyAuthenticationTestCase.java 2008-10-29
07:19:40 UTC (rev 4633)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/proxy/ProxyAuthenticationTestCase.java 2008-10-29
20:57:19 UTC (rev 4634)
@@ -39,6 +39,7 @@
import org.jboss.logging.XLevel;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.util.SecurityUtility;
import org.jboss.util.Base64;
@@ -213,11 +214,19 @@
InvokerLocator clientLocator = new InvokerLocator(locatorURI);
HashMap config = new HashMap();
config.put(InvokerLocator.FORCE_REMOTE, "true");
+ config.put(ServerInvoker.TIMEOUT, "10000");
Client client = new Client(clientLocator, config);
client.connect();
log.info("client is connected");
- client.invoke("abc", metadata);
-
+ try
+ {
+ client.invoke("abc", metadata);
+ }
+ catch (Throwable t)
+ {
+ log.error("invoke failed", t);
+ fail();
+ }
// Verify correct authorization was sent.
assertEquals(auth, server.auth);
client.disconnect();
@@ -255,6 +264,7 @@
System.out.println();
auth = getAuth(request);
+ log.info("writing response");
DataOutputStream dos = new DataOutputStream(s.getOutputStream());
dos.writeBytes("HTTP/1.1 200 OK" + "\r\n");
dos.writeBytes("Server: testServer");
@@ -262,11 +272,13 @@
dos.writeBytes("Content-Length: 0\r\n");
dos.writeBytes("Connection: close\r\n");
dos.writeBytes("\r\n");
+ log.info("wrote response");
ir.close();
dos.close();
s.close();
ss.close();
+ log.info("closed HTTP server");
}
catch (EOFException e1)
{
Show replies by date