use of pipelite.tester.pipeline.ConfigurableTestPipeline in project pipelite by enasequence.
the class TestTypePipelineRunner method runPipelines.
public <T extends SingleStageTestProcessConfiguration> void runPipelines(StageService stageServiceSpy, int parallelism, int processCnt, Function<TestType, T> testProcessConfigurationFactory) {
// Register test pipelines.
List<ConfigurableTestPipeline<T>> testPipelines = new ArrayList<>();
for (TestType testType : TestType.tests) {
ConfigurableTestPipeline<T> pipeline = new ConfigurableTestPipeline<T>(parallelism, processCnt, testProcessConfigurationFactory.apply(testType));
testPipelines.add(pipeline);
registeredPipelineService.registerPipeline(pipeline);
}
// Spy stage service.
TestType.spyStageService(stageServiceSpy);
// Run test pipelines.
processRunnerPoolManager.createPools();
processRunnerPoolManager.startPools();
processRunnerPoolManager.waitPoolsToStop();
// Assert test pipelines.
for (PipelineRunner pipelineRunner : runnerService.getPipelineRunners()) {
assertThat(pipelineRunner.getActiveProcessRunners().size()).isEqualTo(0);
}
for (ConfigurableTestPipeline<T> testPipeline : testPipelines) {
assertPipeline(stageServiceSpy, testPipeline, processCnt);
}
}
use of pipelite.tester.pipeline.ConfigurableTestPipeline in project pipelite by enasequence.
the class PipelineRunnerProcessQueueTest method sync.
@Test
public void sync() {
Pipeline pipeline = new ConfigurableTestPipeline<>(PARALLELISM, PROCESS_CNT, new SyncTestProcessConfiguration());
test(pipeline);
}
use of pipelite.tester.pipeline.ConfigurableTestPipeline in project pipelite by enasequence.
the class PipelineRunnerProcessQueueTest method async.
@Test
public void async() {
Pipeline pipeline = new ConfigurableTestPipeline<>(PARALLELISM, PROCESS_CNT, new AsyncTestProcessConfiguration());
test(pipeline);
}
Aggregations