BATCH-1744: fix integratiom tests to use step scoped policy approach
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#Sat Mar 13 13:37:06 GMT 2010
|
||||
#Thu May 05 09:33:21 BST 2011
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core-tests/src/main/resources/META-INF/batch/footballSkipJob.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1360" endstart\="1354" start\="607" startend\="685"/>\n<bounds height\="228" width\="174" x\="15" y\="19"/>\n</element>\n<element clazz\="StepModelElement" type\="step">\n<structure end\="2327" endstart\="2320" start\="2100" startend\="2181"/>\n<bounds height\="34" width\="143" x\="203" y\="19"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core-tests/src/test/resources/org/springframework/batch/core/test/step/SplitJobMapRepositoryIntegrationTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element type\="job">\n<structure end\="709" endstart\="703" start\="456" startend\="522"/>\n<bounds height\="136" width\="78" x\="93" y\="19"/>\n</element>\n<element type\="step">\n<structure end\="1133" endstart\="1126" start\="910" startend\="978"/>\n<bounds height\="34" width\="58" x\="17" y\="19"/>\n</element>\n<element type\="split">\n<structure end\="701" endstart\="693" start\="525" startend\="572"/>\n<bounds height\="189" width\="197" x\="183" y\="121"/>\n</element>\n</graph>
|
||||
eclipse.preferences.version=1
|
||||
|
||||
@@ -9,14 +9,7 @@
|
||||
<step id="playerload" next="gameLoad">
|
||||
<tasklet>
|
||||
<chunk reader="playerFileItemReader" writer="playerWriter" commit-interval="${job.commit.interval}"
|
||||
skip-limit="#{jobParameters['skip.limit']}" retry-limit="#{jobParameters['retry.limit']}">
|
||||
<skippable-exception-classes>
|
||||
<include class="org.springframework.dao.DataAccessException" />
|
||||
</skippable-exception-classes>
|
||||
<retryable-exception-classes>
|
||||
<include class="org.springframework.dao.DataAccessException" />
|
||||
</retryable-exception-classes>
|
||||
</chunk>
|
||||
skip-policy="skipPolicy" retry-policy="retryPolicy"/>
|
||||
</tasklet>
|
||||
</step>
|
||||
<step id="gameLoad" next="playerSummarization">
|
||||
@@ -30,6 +23,24 @@
|
||||
</step>
|
||||
<step id="playerSummarization" parent="summarizationStep" />
|
||||
</job>
|
||||
|
||||
<bean id="skipPolicy" class="org.springframework.batch.core.step.skip.LimitCheckingItemSkipPolicy" scope="step">
|
||||
<property name="skipLimit" value="#{jobParameters['skip.limit']}" />
|
||||
<property name="skippableExceptionMap">
|
||||
<map key-type="java.lang.Class">
|
||||
<entry key="org.springframework.dao.DataAccessException" value="true"/>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="retryPolicy" class="org.springframework.batch.retry.policy.SimpleRetryPolicy" scope="step">
|
||||
<property name="maxAttempts" value="#{jobParameters['retry.limit']}" />
|
||||
<property name="retryableExceptions">
|
||||
<map key-type="java.lang.Class">
|
||||
<entry key="org.springframework.dao.DataAccessException" value="true"/>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<step id="summarizationStep" xmlns="http://www.springframework.org/schema/batch">
|
||||
<tasklet>
|
||||
|
||||
Reference in New Issue
Block a user