BATCH-1884: JobLauncherIntegrationTests failing
This commit is contained in:
committed by
Dave Syer
parent
a8d2dd2a3f
commit
1430f3d7de
@@ -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() {
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="initScripts">
|
||||
<list>
|
||||
<value>schema-hsqldb.sql</value>
|
||||
<value>org/springframework/batch/core/schema-drop-hsqldb.sql</value>
|
||||
<value>org/springframework/batch/core/schema-hsqldb.sql</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
Reference in New Issue
Block a user