@Inject public PipelineExecutorTaskManagerImpl(final PipelineRegistry pipelineRegistry, final Instance<ConfigExecutor> configExecutorInstance, final Instance<PipelineEventListener> pipelineEventListenerInstance, final PipelineExecutorRegistry pipelineExecutorRegistry) { this.pipelineRegistry = pipelineRegistry; this.taskManagerHelper = new PipelineExecutorTaskManagerImplHelper(configExecutorInstance, pipelineEventListenerInstance); this.pipelineExecutorRegistry = pipelineExecutorRegistry; }
@Inject public PipelineExecutorTaskManagerImpl(final PipelineRegistry pipelineRegistry, final Instance<ConfigExecutor> configExecutorInstance, final Instance<PipelineEventListener> pipelineEventListenerInstance, final PipelineExecutorRegistry pipelineExecutorRegistry) { this.pipelineRegistry = pipelineRegistry; this.taskManagerHelper = new PipelineExecutorTaskManagerImplHelper(configExecutorInstance, pipelineEventListenerInstance); this.pipelineExecutorRegistry = pipelineExecutorRegistry; }
@Before public void setUp() { clearDefaultProperties(); configExecutors = mockConfigExecutors(CONFIG_EXECUTORS_SIZE); when(configExecutorsInstance.iterator()).thenReturn(configExecutors.iterator()); externalListeners = mockEventListeners(PIPELINE_EVENT_LISTENERS); when(eventListenersInstance.iterator()).thenReturn(externalListeners.iterator()); taskManagerHelper = spy(new PipelineExecutorTaskManagerImplHelper(configExecutorsInstance, eventListenersInstance)); }
@Before public void setUp() { clearDefaultProperties(); configExecutors = mockConfigExecutors(CONFIG_EXECUTORS_SIZE); when(configExecutorsInstance.iterator()).thenReturn(configExecutors.iterator()); externalListeners = mockEventListeners(PIPELINE_EVENT_LISTENERS); when(eventListenersInstance.iterator()).thenReturn(externalListeners.iterator()); taskManagerHelper = spy(new PipelineExecutorTaskManagerImplHelper(configExecutorsInstance, eventListenersInstance)); }
@Before public void setUp() { pipelineExecutorTraceCaptor = ArgumentCaptor.forClass(PipelineExecutorTrace.class); taskEntryCaptor = ArgumentCaptor.forClass(PipelineExecutorTaskManagerImpl.TaskEntry.class); stringCaptor = ArgumentCaptor.forClass(String.class); configExecutors = mockConfigExecutors(CONFIG_EXECUTORS_SIZE); when(configExecutorsInstance.iterator()).thenReturn(configExecutors.iterator()); externalListeners = mockEventListeners(PIPELINE_EVENT_LISTENERS); when(eventListenersInstance.iterator()).thenReturn(externalListeners.iterator()); taskManagerHelper = spy(new PipelineExecutorTaskManagerImplHelper(configExecutorsInstance, eventListenersInstance)); doReturn(executorService).when(taskManagerHelper).createExecutorService(); doReturn(pipelineExecutor).when(taskManagerHelper).createPipelineExecutor(); taskManager = spy(new PipelineExecutorTaskManagerImpl(pipelineRegistry, configExecutorsInstance, eventListenersInstance, pipelineExecutorRegistry) { { super.taskManagerHelper = PipelineExecutorTaskManagerImplTestBase.this.taskManagerHelper; } @Override protected void init() { super.init(); super.futureTaskMap = spy(super.futureTaskMap); } }); }
@Before public void setUp() { pipelineExecutorTraceCaptor = ArgumentCaptor.forClass(PipelineExecutorTrace.class); taskEntryCaptor = ArgumentCaptor.forClass(PipelineExecutorTaskManagerImpl.TaskEntry.class); stringCaptor = ArgumentCaptor.forClass(String.class); configExecutors = mockConfigExecutors(CONFIG_EXECUTORS_SIZE); when(configExecutorsInstance.iterator()).thenReturn(configExecutors.iterator()); externalListeners = mockEventListeners(PIPELINE_EVENT_LISTENERS); when(eventListenersInstance.iterator()).thenReturn(externalListeners.iterator()); taskManagerHelper = spy(new PipelineExecutorTaskManagerImplHelper(configExecutorsInstance, eventListenersInstance)); doReturn(executorService).when(taskManagerHelper).createExecutorService(); doReturn(pipelineExecutor).when(taskManagerHelper).createPipelineExecutor(); taskManager = spy(new PipelineExecutorTaskManagerImpl(pipelineRegistry, configExecutorsInstance, eventListenersInstance, pipelineExecutorRegistry) { { super.taskManagerHelper = PipelineExecutorTaskManagerImplTestBase.this.taskManagerHelper; } @Override protected void init() { super.init(); super.futureTaskMap = spy(super.futureTaskMap); } }); }