use of pipelite.Pipeline 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);
}
use of pipelite.Pipeline in project pipelite by enasequence.
the class ProcessFactoryTest method createSuccess.
@Test
public void createSuccess() {
ProcessEntity processEntity = new ProcessEntity();
processEntity.setProcessId(PROCESS_ID);
processEntity.setPipelineName(PIPELINE_NAME);
Pipeline pipeline = new Pipeline() {
@Override
public String pipelineName() {
return PIPELINE_NAME;
}
@Override
public Options configurePipeline() {
return new Options().pipelineParallelism(5);
}
@Override
public void configureProcess(ProcessBuilder builder) {
builder.execute("STAGE1").withSyncTestExecutor();
}
};
Process process = ProcessFactory.create(processEntity, pipeline);
assertThat(process).isNotNull();
assertThat(process.getProcessId()).isEqualTo(PROCESS_ID);
assertThat(process.getProcessEntity()).isNotNull();
assertThat(process.getProcessEntity()).isSameAs(processEntity);
}
use of pipelite.Pipeline in project pipelite by enasequence.
the class ProcessRunnerPoolManager method _createPipelineRunners.
/**
* Should not be called directly. Called by {@link #createPools()}.
*/
public void _createPipelineRunners() {
if (state != State.STOPPED) {
log.atWarning().log("Failed to create pipeline runners manager state is not stopped");
return;
}
for (Pipeline pipeline : pipeliteServices.registeredPipeline().getRegisteredPipelines(Pipeline.class)) {
PipelineRunner pipelineRunner = createPipelineRunner(pipeline.pipelineName());
log.atInfo().log("Creating pipeline runner: " + pipeline.pipelineName());
pipeliteServices.runner().addPipelineRunner(pipelineRunner);
pools.add(pipelineRunner);
}
log.atInfo().log("Created pipeline runners");
}
Aggregations