private void testBeforePipelineExecutionEvent(boolean async) { when(taskEntry.isAsync()).thenReturn(async); BeforePipelineExecutionEvent event = new BeforePipelineExecutionEvent(TASK_ID, pipeline); taskManager.localListener.beforePipelineExecution(event); verify(task, times(1)).setPipelineStatus(PipelineExecutorTask.Status.RUNNING); verifyExecutorRegistryUpdated(async); verifyExternalListenersNotified(event); }
@Test public void testBeforePipelineExecution() { listener.beforePipelineExecution(new BeforePipelineExecutionEvent(EXECUTION_ID, pipeline)); verify(pipelineStatusChangeEvent, times(1)).fire(new PipelineStatusChangeEvent(traceKey, PipelineStatus.RUNNING)); }
private void testBeforePipelineExecutionEvent(boolean async) { when(taskEntry.isAsync()).thenReturn(async); BeforePipelineExecutionEvent event = new BeforePipelineExecutionEvent(TASK_ID, pipeline); taskManager.localListener.beforePipelineExecution(event); verify(task, times(1)).setPipelineStatus(PipelineExecutorTask.Status.RUNNING); verifyExecutorRegistryUpdated(async); verifyExternalListenersNotified(event); }
@Test public void testBeforePipelineExecution() { listener.beforePipelineExecution(new BeforePipelineExecutionEvent(EXECUTION_ID, pipeline)); verify(pipelineStatusChangeEvent, times(1)).fire(new PipelineStatusChangeEvent(traceKey, PipelineStatus.RUNNING)); }
public <T> void execute(final Input input, final Pipeline pipeline, final Consumer<T> callback, final PipelineEventListener... eventListeners) { final PipelineContext context = new PipelineContext(pipeline); context.start(input); context.pushCallback(callback); propagateEvent(new BeforePipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); continuePipeline(context, eventListeners); propagateEvent(new AfterPipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); }
public <T> void execute(final Input input, final Pipeline pipeline, final Consumer<T> callback, final PipelineEventListener... eventListeners) { final PipelineContext context = new PipelineContext(pipeline); context.start(input); context.pushCallback(callback); propagateEvent(new BeforePipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); continuePipeline(context, eventListeners); propagateEvent(new AfterPipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); }