use of io.crate.executor.transport.kill.TransportKillAllNodeAction in project crate by crate.
the class KillTaskTest method testKillTaskCallsBroadcastOnTransportKillAllNodeAction.
@SuppressWarnings("unchecked")
@Test
public void testKillTaskCallsBroadcastOnTransportKillAllNodeAction() throws Exception {
TransportKillAllNodeAction killAllNodeAction = mock(TransportKillAllNodeAction.class);
KillTask task = new KillTask(killAllNodeAction, UUID.randomUUID());
task.execute(new TestingBatchConsumer(), Row.EMPTY);
verify(killAllNodeAction, times(1)).broadcast(any(KillAllRequest.class), any(ActionListener.class));
verify(killAllNodeAction, times(0)).nodeOperation(any(KillAllRequest.class), any(ActionListener.class));
}
Aggregations