use of io.crate.action.job.TransportJobAction in project crate by crate.
the class RemoteCollectorTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
UUID jobId = UUID.randomUUID();
RoutedCollectPhase collectPhase = new RoutedCollectPhase(jobId, 0, "remoteCollect", new Routing(ImmutableMap.<String, Map<String, List<Integer>>>of("remoteNode", ImmutableMap.of("dummyTable", Collections.singletonList(1)))), RowGranularity.DOC, Collections.<Symbol>singletonList(createReference("name", DataTypes.STRING)), Collections.<Projection>emptyList(), WhereClause.MATCH_ALL, DistributionInfo.DEFAULT_BROADCAST);
transportJobAction = mock(TransportJobAction.class);
transportKillJobsNodeAction = mock(TransportKillJobsNodeAction.class);
consumer = new TestingBatchConsumer();
JobsLogs jobsLogs = new JobsLogs(() -> true);
JobContextService jobContextService = new JobContextService(Settings.EMPTY, new NoopClusterService(), jobsLogs);
remoteCollector = new RemoteCollector(jobId, "localNode", "remoteNode", transportJobAction, transportKillJobsNodeAction, jobContextService, mock(RamAccountingContext.class), consumer, collectPhase);
}
Aggregations