// avoid early client resends
greeterBus.getExtension(RMManager.class).getRMAssertion().getBaseRetransmissionInterval()
.setMilliseconds(new Long(60000));
GreeterService gs = new GreeterService();
Greeter greeter = gs.getGreeterPort();
updateAddressPort(greeter, PORT);
LOG.fine("Created greeter client.");
ConnectionHelper.setKeepAliveConnection(greeter, false, true);
Client c = ClientProxy.getClient(greeter);
HTTPConduit hc = (HTTPConduit)(c.getConduit());
HTTPClientPolicy cp = hc.getClient();
cp.setDecoupledEndpoint("http://localhost:" + DECOUPLE_PORT + "/decoupled_endpoint");
out = new OutMessageRecorder();
in = new InMessageRecorder();
greeterBus.getOutInterceptors().add(out);
greeterBus.getInInterceptors().add(in);
LOG.fine("Configured greeter client.");
Response<GreetMeResponse> responses[] = cast(new Response[4]);
responses[0] = greeter.greetMeAsync("one");
responses[1] = greeter.greetMeAsync("two");
responses[2] = greeter.greetMeAsync("three");
verifyMissingResponse(responses);
control.stopGreeter(SERVER_LOSS_CFG);
LOG.fine("Stopped greeter server");
out.getOutboundMessages().clear();
in.getInboundMessages().clear();
control.startGreeter(CFG);
String nl = System.getProperty("line.separator");
LOG.fine("Restarted greeter server" + nl + nl);
verifyServerRecovery(responses);
responses[3] = greeter.greetMeAsync("four");
verifyRetransmissionQueue();
verifyAcknowledgementRange(1, 4);
out.getOutboundMessages().clear();