From 36a27fe7dc138dbc308e943bc7679b9d7118bcb7 Mon Sep 17 00:00:00 2001 From: Glenn Renfro Date: Fri, 11 Feb 2022 18:19:49 -0500 Subject: [PATCH] Remove database tables before starting tests --- .../test/repository/SQLiteJobRepositoryIntegrationTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SQLiteJobRepositoryIntegrationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SQLiteJobRepositoryIntegrationTests.java index 775f534612..6546afad74 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SQLiteJobRepositoryIntegrationTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/SQLiteJobRepositoryIntegrationTests.java @@ -74,6 +74,7 @@ public DataSource dataSource() { 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;