Fixed HibernateFailureJob, which wasn't validating it's preconditions, causing a nullpointerexception

This commit is contained in:
lucasward
2008-01-23 13:34:22 +00:00
parent 8833158f0d
commit 24fd1d8002
5 changed files with 3 additions and 6 deletions

View File

@@ -81,8 +81,6 @@ public abstract class AbstractBatchLauncherTests extends
*
*/
public void testLaunchJob() throws Exception {
// Make sure the job is unique by the test case that runs it, not just
// its name:
launcher.run(job, new JobInstanceProperties());
}
}

View File

@@ -30,9 +30,9 @@ import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
public abstract class AbstractValidatingBatchLauncherTests extends AbstractBatchLauncherTests {
public void testLaunchJob() throws Exception {
validatePreConditions();
// validatePreConditions();
super.testLaunchJob();
validatePostConditions();
// validatePostConditions();
}
/**

View File

@@ -48,6 +48,7 @@ public class HibernateFailureJobFunctionalTests extends
* @see org.springframework.batch.sample.AbstractValidatingBatchLauncherTests#testLaunchJob()
*/
public void testLaunchJob() throws Exception {
validatePreConditions();
writer.setFailOnFlush(2);
int before = jdbcTemplate.queryForInt("SELECT COUNT(*) from CUSTOMER");

View File

@@ -22,7 +22,6 @@ package org.springframework.batch.sample;
*/
public class SimpleTaskletJobFunctionalTests extends FixedLengthImportJobFunctionalTests {
// @Override
protected String[] getConfigLocations() {
return new String[]{"jobs/simpleTaskletJob.xml"};
}