BATCH-377: Build error should be fixed now.
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beansProjectDescription>
|
||||
<version>1</version>
|
||||
<pluginVersion><![CDATA[2.0.3.v200802061800]]></pluginVersion>
|
||||
<pluginVersion><![CDATA[2.0.2.v200712142013]]></pluginVersion>
|
||||
<configSuffixes>
|
||||
<configSuffix><![CDATA[xml]]></configSuffix>
|
||||
</configSuffixes>
|
||||
<enableImports><![CDATA[true]]></enableImports>
|
||||
<configs>
|
||||
<config>src/test/resources/org/springframework/batch/core/configuration/support/test-context.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/core/launch/support/job.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/core/launch/support/test-environment.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/core/repository/dao/sql-dao-test.xml</config>
|
||||
</configs>
|
||||
<configSets>
|
||||
<configSet>
|
||||
|
||||
@@ -27,12 +27,8 @@ import org.springframework.batch.core.JobInstance;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.job.JobSupport;
|
||||
import org.springframework.batch.core.repository.dao.JobExecutionDao;
|
||||
import org.springframework.batch.core.repository.dao.JobInstanceDao;
|
||||
import org.springframework.batch.core.repository.dao.NoSuchObjectException;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
@@ -56,7 +52,7 @@ public abstract class AbstractJobDaoTests extends AbstractTransactionalDataSourc
|
||||
protected Date jobExecutionStartTime = new Date(System.currentTimeMillis());
|
||||
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[] { ClassUtils.addResourcePathToPackagePath(getClass(), "sql-dao-test.xml") };
|
||||
return new String[] { "sql-dao-test.xml" };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,16 +26,12 @@ import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.core.job.JobSupport;
|
||||
import org.springframework.batch.core.repository.dao.JobExecutionDao;
|
||||
import org.springframework.batch.core.repository.dao.JobInstanceDao;
|
||||
import org.springframework.batch.core.repository.dao.StepExecutionDao;
|
||||
import org.springframework.batch.core.step.ExitStatusExceptionClassifier;
|
||||
import org.springframework.batch.core.step.StepSupport;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
import org.springframework.dao.OptimisticLockingFailureException;
|
||||
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Tests for step persistence (StepInstanceDao and StepExecutionDao). Because it is very reasonable to assume that there is a
|
||||
@@ -84,7 +80,7 @@ public abstract class AbstractStepDaoTests extends AbstractTransactionalDataSour
|
||||
* @see org.springframework.test.AbstractSingleSpringContextTests#getConfigLocations()
|
||||
*/
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[] { ClassUtils.addResourcePathToPackagePath(getClass(), "sql-dao-test.xml") };
|
||||
return new String[] { "sql-dao-test.xml" };
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.test.AbstractTransactionalDataSourceSpringContextTest
|
||||
public class SimpleJobRepositoryIntegrationTests extends AbstractTransactionalDataSourceSpringContextTests {
|
||||
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[] { "classpath:org/springframework/batch/core/repository/dao/sql-dao-test.xml" };
|
||||
return new String[] { "classpath:sql-dao-test.xml" };
|
||||
}
|
||||
|
||||
private SimpleJobRepository jobRepository;
|
||||
|
||||
@@ -57,6 +57,6 @@ public class JdbcCursorItemReaderPreparedStatementIntegrationTests extends
|
||||
}
|
||||
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[] { "org/springframework/batch/core/resource/data-source-context.xml" };
|
||||
return new String[] { "data-source-context.xml" };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class JobParametersPreparedStatementSetterTests extends AbstractTransacti
|
||||
JobParametersPreparedStatementSetter pss;
|
||||
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[] { ClassUtils.addResourcePathToPackagePath(getClass(), "data-source-context.xml") };
|
||||
return new String[] { "data-source-context.xml" };
|
||||
}
|
||||
|
||||
protected void onSetUpInTransaction() throws Exception {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<property name="url" value="jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true"/>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="initScript" value="org/springframework/batch/core/repository/dao/init.sql" />
|
||||
<property name="destroyScript" value="org/springframework/batch/core/repository/dao/destroy.sql" />
|
||||
<property name="initScript" value="init.sql" />
|
||||
<property name="destroyScript" value="destroy.sql" />
|
||||
</bean>
|
||||
|
||||
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
@@ -4,6 +4,7 @@ DROP TABLE BATCH_STEP_EXECUTION IF EXISTS;
|
||||
DROP TABLE BATCH_JOB_EXECUTION IF EXISTS;
|
||||
DROP TABLE BATCH_JOB_PARAMS IF EXISTS;
|
||||
DROP TABLE BATCH_JOB_INSTANCE IF EXISTS;
|
||||
DROP TABLE T_FOOS;
|
||||
|
||||
DROP TABLE BATCH_STEP_EXECUTION_SEQ IF EXISTS;
|
||||
DROP TABLE BATCH_JOB_EXECUTION_SEQ IF EXISTS;
|
||||
@@ -71,3 +71,17 @@ CREATE TABLE BATCH_JOB_EXECUTION_SEQ (
|
||||
CREATE TABLE BATCH_JOB_SEQ (
|
||||
ID BIGINT IDENTITY
|
||||
);
|
||||
|
||||
CREATE TABLE T_FOOS (
|
||||
ID BIGINT NOT NULL,
|
||||
NAME VARCHAR(45),
|
||||
VALUE INTEGER
|
||||
);
|
||||
|
||||
ALTER TABLE T_FOOS ADD PRIMARY KEY (ID);
|
||||
|
||||
INSERT INTO t_foos (id, name, value) VALUES (1, 'bar1', 1);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (2, 'bar2', 2);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (3, 'bar3', 3);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (4, 'bar4', 4);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (5, 'bar5', 5);
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<bean id="dataSource" class="test.jdbc.datasource.InitializingDataSourceFactoryBean">
|
||||
<property name="dataSource">
|
||||
<bean class="org.springframework.jdbc.datasource.DriverManagerDataSource">
|
||||
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
|
||||
<property name="url" value="jdbc:hsqldb:mem:testdb" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="initScript" value="org/springframework/batch/core/resource/init-foo-schema-hsqldb.sql" />
|
||||
<property name="destroyScript" value="org/springframework/batch/core/resource/destroy-foo-schema-hsqldb.sql" />
|
||||
</bean>
|
||||
|
||||
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
</bean>
|
||||
|
||||
<bean id="incrementerParent" class="org.springframework.jdbc.support.incrementer.HsqlMaxValueIncrementer"
|
||||
abstract="true">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="columnName" value="ID" />
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -1 +0,0 @@
|
||||
DROP TABLE T_FOOS;
|
||||
@@ -1,13 +0,0 @@
|
||||
CREATE TABLE T_FOOS (
|
||||
ID BIGINT NOT NULL,
|
||||
NAME VARCHAR(45),
|
||||
VALUE INTEGER
|
||||
);
|
||||
|
||||
ALTER TABLE T_FOOS ADD PRIMARY KEY (ID);
|
||||
|
||||
INSERT INTO t_foos (id, name, value) VALUES (1, 'bar1', 1);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (2, 'bar2', 2);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (3, 'bar3', 3);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (4, 'bar4', 4);
|
||||
INSERT INTO t_foos (id, name, value) VALUES (5, 'bar5', 5);
|
||||
Reference in New Issue
Block a user