Search in sources :

Example 1 with PipelineExecutorTraceImpl

use of org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTraceImpl in project kie-wb-common by kiegroup.

the class PipelineExecutorTraceImplMarshallerTest method testUnMarshall.

@Override
public void testUnMarshall() throws Exception {
    PipelineExecutorTraceImpl result = marshaller.unmarshal(getMarshalledValue());
    PipelineExecutorTraceImpl expectedValue = getValue();
    assertEqualsPipelineExecutorTrace(expectedValue, result);
}
Also used : PipelineExecutorTraceImpl(org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTraceImpl)

Example 2 with PipelineExecutorTraceImpl

use of org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTraceImpl in project kie-wb-common by kiegroup.

the class PipelineExecutorTraceImplMarshallerTest method getValue.

@Override
public PipelineExecutorTraceImpl getValue() {
    // only the stage names are used by the taskDef, so the pipeline can be mocked.
    List<Stage> stages = mockStages(STAGE_COUNT);
    Pipeline pipeline = new BasePipeline(PIPELINE_NAME, stages) {
    };
    Input input = mockInput(PIPELINE_INPUT_SIZE);
    PipelineExecutorTaskDefImpl taskDef = new PipelineExecutorTaskDefImpl(pipeline, input);
    PipelineExecutorTaskImpl taskImpl = new PipelineExecutorTaskImpl(taskDef, PIPELINE_EXECUTION_ID);
    taskImpl.setPipelineStatus(PipelineExecutorTask.Status.SCHEDULED);
    taskImpl.setPipelineError(mockError(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL));
    taskImpl.getTaskDef().getStages().forEach(stage -> taskImpl.setStageError(stage, mockStageError(stage)));
    taskImpl.setOutput(new MockPipelineOutput(PIPELINE_OUTPUT));
    return new PipelineExecutorTraceImpl(taskImpl);
}
Also used : PipelineExecutorTaskDefImpl(org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskDefImpl) Input(org.guvnor.ala.pipeline.Input) PipelineExecutorTaskImpl(org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskImpl) PipelineExecutorTraceImpl(org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTraceImpl) Stage(org.guvnor.ala.pipeline.Stage) BasePipeline(org.guvnor.ala.pipeline.impl.BasePipeline) BasePipeline(org.guvnor.ala.pipeline.impl.BasePipeline) Pipeline(org.guvnor.ala.pipeline.Pipeline)

Aggregations

PipelineExecutorTraceImpl (org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTraceImpl)2 Input (org.guvnor.ala.pipeline.Input)1 Pipeline (org.guvnor.ala.pipeline.Pipeline)1 Stage (org.guvnor.ala.pipeline.Stage)1 PipelineExecutorTaskDefImpl (org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskDefImpl)1 PipelineExecutorTaskImpl (org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskImpl)1 BasePipeline (org.guvnor.ala.pipeline.impl.BasePipeline)1