RESOLVED: BATCH-1325.

This commit is contained in:
dsyer
2009-07-08 17:43:23 +00:00
parent e1c8f35353
commit 215925e58d
2 changed files with 74 additions and 15 deletions

View File

@@ -89,6 +89,18 @@ public class JobRepositoryTestUtilsTests {
assertEquals(beforeSteps, SimpleJdbcTestUtils.countRowsInTable(jdbcTemplate, "BATCH_STEP_EXECUTION"));
}
@Test
public void testCreateJobExecutionsByName() throws Exception {
utils = new JobRepositoryTestUtils(jobRepository, dataSource);
List<JobExecution> list = utils.createJobExecutions("foo",new String[] {"bar", "spam"}, 3);
assertEquals(3, list.size());
assertEquals(beforeJobs + 3, SimpleJdbcTestUtils.countRowsInTable(jdbcTemplate, "BATCH_JOB_EXECUTION"));
assertEquals(beforeSteps + 6, SimpleJdbcTestUtils.countRowsInTable(jdbcTemplate, "BATCH_STEP_EXECUTION"));
utils.removeJobExecutions();
assertEquals(beforeJobs, SimpleJdbcTestUtils.countRowsInTable(jdbcTemplate, "BATCH_JOB_EXECUTION"));
assertEquals(beforeSteps, SimpleJdbcTestUtils.countRowsInTable(jdbcTemplate, "BATCH_STEP_EXECUTION"));
}
@Test
public void testRemoveJobExecutionsIncrementally() throws Exception {
utils = new JobRepositoryTestUtils(jobRepository, dataSource);