Tweak step execution aggregation

This commit is contained in:
dsyer
2008-11-13 08:58:32 +00:00
parent ef00a5e333
commit d19145d0af
4 changed files with 19 additions and 3 deletions

View File

@@ -43,6 +43,16 @@ public class StepExecutionAggregatorTests {
assertEquals(BatchStatus.COMPLETED, result.getStatus());
}
@Test
public void testAggregateStatusFromFailure() {
result.setStatus(BatchStatus.FAILED);
stepExecution1.setStatus(BatchStatus.COMPLETED);
stepExecution2.setStatus(BatchStatus.COMPLETED);
aggregator.aggregate(result, Arrays.<StepExecution> asList(stepExecution1, stepExecution2));
assertNotNull(result);
assertEquals(BatchStatus.FAILED, result.getStatus());
}
@Test
public void testAggregateStatusIncomplete() {
stepExecution1.setStatus(BatchStatus.COMPLETED);

View File

@@ -105,6 +105,8 @@ public abstract class AbstractStepExecutionDaoTests extends AbstractTransactiona
assertStepExecutionsAreEqual(stepExecution, retrieved);
assertNotNull(retrieved.getVersion());
assertNotNull(retrieved.getJobExecution());
assertNotNull(retrieved.getJobExecution().getId());
assertNull(dao.getStepExecution(jobExecution, "not-existing step"));
}