use of org.guvnor.ala.pipeline.events.PipelineEventListener in project kie-wb-common by kiegroup.
the class BuildPipelineTest method doTestIncrementalBuildResourceExecution.
private void doTestIncrementalBuildResourceExecution(KieModule module, String resourceUri, LocalBuildConfig.BuildType buildType) {
// prepare the pipeline input.
Input input = createIncrementalBuildInput(ROOT_PATH_URI, resourceUri, buildType.name());
// execute the pipeline and verify the result.
pipelineInitializer.getExecutor().execute(input, pipe, (Consumer<LocalBinaryConfig>) localBinaryConfig -> {
assertEquals(incrementalBuildResults, localBinaryConfig.getIncrementalBuildResults());
}, pipelineEventListener);
// verify that all stages were properly invoked.
verifyLocalSourceConfigWasInvoked();
verifyLocalProjectConfigWasInvoked();
verifyLocalBuildConfigExecutorWasInvoked(module, resourceUri, buildType.name());
verifyLocalBuildExecConfigExecutorWasInvoked(module, Paths.convert(getNioPath(resourceUri)), buildType);
// verify the pipeline events where properly raised.
verifyPipelineEvents();
}
use of org.guvnor.ala.pipeline.events.PipelineEventListener in project kie-wb-common by kiegroup.
the class BuildPipelineTest method testIncrementalBuildResourceChangesExecution.
@Test
public void testIncrementalBuildResourceChangesExecution() {
when(buildHelper.applyBatchResourceChanges(eq(module), any(Map.class))).thenReturn(incrementalBuildResults);
// prepare the pipeline input.
Input input = createBatchChangesInput(ROOT_PATH_URI, LocalBuildConfig.BuildType.INCREMENTAL_BATCH_CHANGES.name(), changes);
// execute the pipeline and verify the result.
pipelineInitializer.getExecutor().execute(input, pipe, (Consumer<LocalBinaryConfig>) localBinaryConfig -> {
assertEquals(incrementalBuildResults, localBinaryConfig.getIncrementalBuildResults());
}, pipelineEventListener);
// verify that all stages were properly invoked.
verifyLocalSourceConfigWasInvoked();
verifyLocalProjectConfigWasInvoked();
verifyLocalBuildConfigExecutorWasInvoked(module, changes);
verifyLocalBuildExecConfigExecutorWasInvoked(module, changes);
// verify the pipeline events where properly raised.
verifyPipelineEvents();
}
use of org.guvnor.ala.pipeline.events.PipelineEventListener in project kie-wb-common by kiegroup.
the class PipelineExecutorTaskManagerImplTestBase method mockEventListeners.
public static List<PipelineEventListener> mockEventListeners(int count) {
List<PipelineEventListener> result = new ArrayList<>();
for (int i = 0; i < count; i++) {
PipelineEventListener listener = mock(PipelineEventListener.class);
result.add(listener);
}
return result;
}
Aggregations