From 1430f3d7def6d958430dc97cd7ca9633d66da1c0 Mon Sep 17 00:00:00 2001 From: Chris Schaefer Date: Thu, 30 Aug 2012 16:13:17 -0400 Subject: [PATCH] BATCH-1884: JobLauncherIntegrationTests failing --- .../java/test/jdbc/datasource/DataSourceInitializer.java | 6 ++++-- .../core/launch/JobLauncherIntegrationTests-context.xml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java b/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java index 225e02195..2b9031f62 100644 --- a/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java +++ b/spring-batch-core/src/test/java/test/jdbc/datasource/DataSourceInitializer.java @@ -91,8 +91,10 @@ public class DataSourceInitializer implements InitializingBean { } private void doExecuteScript(final Resource scriptResource) { - if (scriptResource == null || !scriptResource.exists()) - return; + if (scriptResource == null || !scriptResource.exists()) { + throw new IllegalArgumentException("Script resource is null or does not exist"); + } + TransactionTemplate transactionTemplate = new TransactionTemplate(new DataSourceTransactionManager(dataSource)); transactionTemplate.execute(new TransactionCallback() { diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/launch/JobLauncherIntegrationTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/launch/JobLauncherIntegrationTests-context.xml index 3cc0a7735..8f42996a2 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/launch/JobLauncherIntegrationTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/launch/JobLauncherIntegrationTests-context.xml @@ -21,7 +21,8 @@ - schema-hsqldb.sql + org/springframework/batch/core/schema-drop-hsqldb.sql + org/springframework/batch/core/schema-hsqldb.sql