use of pipelite.stage.parameters.ExecutorParameters in project pipelite by enasequence.
the class StageExecutorSerializerTest method deserializeExecutorParams.
@Test
public void deserializeExecutorParams() {
StageEntity stageEntity = new StageEntity();
stageEntity.setExecutorParams("{\n" + " \"maximumRetries\" : 3,\n" + " \"immediateRetries\" : 3\n" + "}");
TestExecutor executor = new TestExecutor(StageState.SUCCESS);
Stage stage = Stage.builder().stageName("STAGE1").executor(executor).build();
stage.setStageEntity(stageEntity);
ExecutorParameters deserializedExecutorParams = StageExecutorSerializer.deserializeExecutorParameters(stage, executor.getExecutorParamsType());
assertThat(deserializedExecutorParams).isNotNull();
assertThat(deserializedExecutorParams.getImmediateRetries()).isEqualTo(3);
assertThat(deserializedExecutorParams.getMaximumRetries()).isEqualTo(3);
}
Aggregations