RESOLVED - BATCH-946: NullPointerException in MapStepExecutionDao.getStepExecutions
return empty list if there are no saved stepExecutions
This commit is contained in:
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -226,6 +227,12 @@ public abstract class AbstractStepExecutionDaoTests extends AbstractTransactiona
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetStepExecutionsWhenNoneExist() throws Exception {
|
||||
assertEquals("empty list is returned if no stepExecutions exist for given jobExecution", Collections
|
||||
.emptyList(), dao.getStepExecutions(jobExecution));
|
||||
}
|
||||
|
||||
private void assertStepExecutionsAreEqual(StepExecution expected, StepExecution actual) {
|
||||
assertEquals(expected.getId(), actual.getId());
|
||||
assertEquals(expected.getStartTime(), actual.getStartTime());
|
||||
|
||||
Reference in New Issue
Block a user