Add support for oracle to all infrastructure tests

This commit is contained in:
dsyer
2010-06-13 11:37:11 +00:00
parent 1b33bf8985
commit 1ed666600d
5 changed files with 11 additions and 2 deletions

View File

@@ -139,6 +139,8 @@ public class IbatisPagingItemReaderAsyncTests {
IbatisPagingItemReader<Foo> reader = new IbatisPagingItemReader<Foo>();
if ("postgres".equals(System.getProperty("ENVIRONMENT"))) {
reader.setQueryId("getPagedFoosPostgres");
} else if ("oracle".equals(System.getProperty("ENVIRONMENT"))) {
reader.setQueryId("getPagedFoosOracle");
} else {
reader.setQueryId("getPagedFoos");
}

View File

@@ -1,7 +1,7 @@
# Placeholders batch.*
# for Oracle:
batch.jdbc.driver=oracle.jdbc.OracleDriver
batch.jdbc.url=jdbc:oracle:thin:@oracle:1521:xe
batch.jdbc.url=jdbc:oracle:thin:@localhost:1521:xe
batch.jdbc.user=spring
batch.jdbc.password=spring
batch.jdbc.testWhileIdle=false

View File

@@ -6,7 +6,7 @@
<import resource="classpath:/data-source-context.xml"/>
<!-- Initialise the database before every test case: -->
<!-- Override the default: -->
<bean id="dataSourceInitializer" class="test.jdbc.datasource.DataSourceInitializer">
<property name="dataSource" ref="dataSource"/>
<property name="initialize" value="${batch.data.source.init}"/>

View File

@@ -30,6 +30,10 @@
select ID, NAME, VALUE from T_FOOS order by ID LIMIT #_pagesize# OFFSET #_skiprows#
</select>
<select id="getPagedFoosOracle" resultMap="fooResult">
select * from (select ID, NAME, VALUE, ROWNUM as tmp from T_FOOS order by ID) where tmp &gt; #_skiprows# and tmp&lt;=(#_skiprows#+#_pagesize#)
</select>
<select id="getAllFooIdsRestart" resultClass="int">
select ID from T_FOOS where ID > #id#
</select>

View File

@@ -0,0 +1,3 @@
#Mon May 17 10:38:33 BST 2010
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-samples/src/main/resources/jobs/ioSampleJob.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element type\="job">\n<structure end\="638" endstart\="632" start\="394" startend\="468"/>\n<bounds height\="118" width\="130" x\="15" y\="17"/>\n</element>\n</graph>
eclipse.preferences.version=1