public void testDeadControlConnectionShutdown() throws Throwable
{
log.info("entering " + getName());
String host = InetAddress.getLocalHost().getHostName();
String locatorURI = getTransport() + "://" + host + ":" + port;
InvokerLocator serverLocator = new InvokerLocator(locatorURI);
log.info("Connecting to: " + serverLocator);
HashMap config = new HashMap();
config.put(InvokerLocator.FORCE_REMOTE, "true");
config.put(Bisocket.IS_CALLBACK_SERVER, "true");
config.put(Bisocket.PING_FREQUENCY, TEST_PING_FREQUENCY_STRING);
int MAX_RETRIES = 3;
config.put(Bisocket.MAX_CONTROL_CONNECTION_RESTARTS, Integer.toString(MAX_RETRIES));
addExtraClientConfig(config);
Client client = new Client(serverLocator, config);
client.connect();
log.info("client is connected");
assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
String callbackLocatorURI = getTransport() + "://" + host + ":1";
config.put(Bisocket.IS_CALLBACK_SERVER, "true");
Connector callbackConnector = new Connector(callbackLocatorURI, config);
callbackConnector.start();
SimpleCallbackHandler callbackHandler = new SimpleCallbackHandler();
client.addListener(callbackHandler, new InvokerLocator(callbackLocatorURI));
log.info("client added callback handler");
client.invoke(CALLBACK_TEST);
assertEquals(1, callbackHandler.callbackCounter);
SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();