assertTrue("server did not launch correctly", launchServer(Server.class));
}
@Test
public void testUseCustomExecutorOnClient() throws Exception {
BasicGreeterService service = new BasicGreeterService();
class CustomExecutor implements Executor {
private int count;
public void execute(Runnable command) {
count++;
command.run();
}
public int getCount() {
return count;
}
}
CustomExecutor executor = new CustomExecutor();
service.setExecutor(executor);
assertSame(executor, service.getExecutor());
Greeter proxy = service.getGreeterPort();
updateAddressPort(proxy, PORT);
assertEquals(0, executor.getCount());
Response<GreetMeResponse> response = proxy.greetMeAsync("cxf");