Author: ron.sigal(a)jboss.com
Date: 2008-11-20 12:37:11 -0500 (Thu, 20 Nov 2008)
New Revision: 4737
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/NullInputStreamTestCase.java
Log:
JBREM-1046: Catch and ignore strange CannotConnectException.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/NullInputStreamTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/NullInputStreamTestCase.java 2008-11-20
17:33:41 UTC (rev 4736)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/NullInputStreamTestCase.java 2008-11-20
17:37:11 UTC (rev 4737)
@@ -41,6 +41,7 @@
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.jboss.logging.XLevel;
+import org.jboss.remoting.CannotConnectException;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvokerLocator;
@@ -343,7 +344,16 @@
Client client = new Client(clientLocator, config);
client.connect();
log.info("client is connected");
- return client.invoke("abc", metadata);
+
+ try
+ {
+ return client.invoke("abc", metadata);
+ }
+ catch (CannotConnectException e)
+ {
+ log.info("exception thrown during invocation: " + e.getMessage());
+ return "CannotConnectException: ok";
+ }
}