Fixed HibernateFailureJob, which wasn't validating it's preconditions, causing a nullpointerexception
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -22,7 +22,6 @@ package org.springframework.batch.sample;
|
||||
*/
|
||||
public class SimpleTaskletJobFunctionalTests extends FixedLengthImportJobFunctionalTests {
|
||||
|
||||
// @Override
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[]{"jobs/simpleTaskletJob.xml"};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user