use of io.crate.action.job.JobResponse in project crate by crate.
the class RemoteCollectorTest method testKillRequestsAreMadeIfCollectorIsKilledAfterRemoteContextCreation.
@Test
public void testKillRequestsAreMadeIfCollectorIsKilledAfterRemoteContextCreation() throws Exception {
remoteCollector.doCollect();
verify(transportJobAction, times(1)).execute(eq("remoteNode"), any(JobRequest.class), listenerCaptor.capture());
remoteCollector.kill(new InterruptedException());
ActionListener<JobResponse> listener = listenerCaptor.getValue();
listener.onResponse(new JobResponse());
verify(transportKillJobsNodeAction, times(1)).broadcast(any(KillJobsRequest.class), any(ActionListener.class));
}
Aggregations