Remove database tables before starting tests

This commit is contained in:
Glenn Renfro
2022-02-11 18:19:49 -05:00
committed by Mahmoud Ben Hassine
parent 75b1492039
commit 401feb29f7

View File

@@ -74,6 +74,7 @@ public class SQLiteJobRepositoryIntegrationTests {
SQLiteDataSource dataSource = new SQLiteDataSource();
dataSource.setUrl("jdbc:sqlite:target/spring-batch.sqlite");
ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();
databasePopulator.addScript(new ClassPathResource("/org/springframework/batch/core/schema-drop-sqlite.sql"));
databasePopulator.addScript(new ClassPathResource("/org/springframework/batch/core/schema-sqlite.sql"));
databasePopulator.execute(dataSource);
return dataSource;