addExtraClientConfig(clientConfig);
Client client = new Client(clientLocator, clientConfig);
client.connect();
log.info("client is connected");
MicroSocketClientInvoker clientInvoker = (MicroSocketClientInvoker) client.getInvoker();
assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
for (int i = 0; i < 50; i++)
{
assertEquals(Integer.toString(i), (String) client.invoke(Integer.toString(i)));
}
assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
disableServer(connector);
shutdownServer();
setupServer(port);
assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
for (int i = 0; i < 50; i++)
{
assertEquals(Integer.toString(i), (String) client.invoke(Integer.toString(i)));
}
assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
client.disconnect();
shutdownServer();
log.info(getName() + " PASSES");
}