Remove test data before launch
This commit is contained in:
@@ -32,7 +32,7 @@ public class FootballJobFunctionalTests extends AbstractValidatingBatchLauncherT
|
||||
@Override
|
||||
protected void validatePostConditions() throws Exception {
|
||||
int count = simpleJdbcTemplate.queryForInt("SELECT COUNT(*) from PLAYER_SUMMARY");
|
||||
assertTrue(count>0);
|
||||
assertTrue(count > 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.core.BatchStatus;
|
||||
import org.springframework.batch.core.JobParameter;
|
||||
@@ -21,6 +22,13 @@ public abstract class NonSequentialJobFunctionalTestsBase extends AbstractJobTes
|
||||
|
||||
private SimpleJdbcTemplate simpleJdbcTemplate;
|
||||
|
||||
@Before
|
||||
protected void removeOldData() throws Exception {
|
||||
simpleJdbcTemplate.update("DELETE FROM PLAYERS");
|
||||
simpleJdbcTemplate.update("DELETE FROM GAMES");
|
||||
simpleJdbcTemplate.update("DELETE FROM PLAYER_SUMMARY");
|
||||
}
|
||||
|
||||
/**
|
||||
* This test processes a file that contains bad records. Those records will
|
||||
* skip. The step execution listener will detect that skips have occurred,
|
||||
|
||||
Reference in New Issue
Block a user