@Test public void testOnStageError() { listener.onStageError(new OnErrorStageExecutionEvent(EXECUTION_ID, pipeline, stage, throwable)); verify(stageStatusChangeEvent, times(1)).fire(new StageStatusChangeEvent(traceKey, STAGE_NAME, PipelineStatus.ERROR)); }
@Test public void testOnStageError() { listener.onStageError(new OnErrorStageExecutionEvent(EXECUTION_ID, pipeline, stage, throwable)); verify(stageStatusChangeEvent, times(1)).fire(new StageStatusChangeEvent(traceKey, STAGE_NAME, PipelineStatus.ERROR)); }
private void testOnStageErrorExecutionEvent(boolean async) { when(taskEntry.isAsync()).thenReturn(async); OnErrorStageExecutionEvent event = new OnErrorStageExecutionEvent(TASK_ID, pipeline, stage, error); taskManager.localListener.onStageError(event); verify(task, times(1)).setPipelineStatus(PipelineExecutorTask.Status.ERROR); verify(task, times(1)).setStageStatus(stage.getName(), PipelineExecutorTask.Status.ERROR); verify(task, times(1)).setStageError(eq(stage.getName()), pipelineExecutorErrorCaptor.capture()); assertEquals(new PipelineExecutorError(ERROR_MESSAGE, error), pipelineExecutorErrorCaptor.getValue()); verifyExecutorRegistryUpdated(async); verifyExternalListenersNotified(event); }
private void testOnStageErrorExecutionEvent(boolean async) { when(taskEntry.isAsync()).thenReturn(async); OnErrorStageExecutionEvent event = new OnErrorStageExecutionEvent(TASK_ID, pipeline, stage, error); taskManager.localListener.onStageError(event); verify(task, times(1)).setPipelineStatus(PipelineExecutorTask.Status.ERROR); verify(task, times(1)).setStageStatus(stage.getName(), PipelineExecutorTask.Status.ERROR); verify(task, times(1)).setStageError(eq(stage.getName()), pipelineExecutorExceptionCaptor.capture()); assertEqualsException(new PipelineExecutorException(ERROR_MESSAGE, error), pipelineExecutorExceptionCaptor.getValue()); verifyExecutorRegistryUpdated(async); verifyExternalListenersNotified(event); }
final RuntimeException exception = new RuntimeException("An error occurred while executing the " + (stage == null ? "null" : stage.getName()) + " stage.", t); propagateEvent(new OnErrorStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage,
final RuntimeException exception = new RuntimeException("An error occurred while executing the " + (stage == null ? "null" : stage.getName()) + " stage.", t); propagateEvent(new OnErrorStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage,