RESOLVED - issue BATCH-231: Chunk completion policy
http://jira.springframework.org/browse/BATCH-231 Added RepeatOperationsStepFactoryBean.
This commit is contained in:
@@ -57,7 +57,7 @@ public class CompositeRepeatListenerTests extends TestCase {
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.springframework.batch.execution.listener.CompositeStepListener#setListener(org.springframework.batch.core.domain.StepListener)}.
|
||||
* {@link org.springframework.batch.execution.listener.CompositeStepListener#registerListener(org.springframework.batch.core.domain.StepListener)}.
|
||||
*/
|
||||
public void testSetListener() {
|
||||
listener.register(new RepeatListenerSupport() {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class RepeatListenerTests extends TestCase {
|
||||
public void testBeforeInterceptorCanVeto() throws Exception {
|
||||
RepeatTemplate template = new RepeatTemplate();
|
||||
final List calls = new ArrayList();
|
||||
template.setListener(new RepeatListenerSupport() {
|
||||
template.registerListener(new RepeatListenerSupport() {
|
||||
public void before(RepeatContext context) {
|
||||
calls.add("1");
|
||||
context.setCompleteOnly();
|
||||
@@ -130,7 +130,7 @@ public class RepeatListenerTests extends TestCase {
|
||||
public void testSingleOpenInterceptor() throws Exception {
|
||||
RepeatTemplate template = new RepeatTemplate();
|
||||
final List calls = new ArrayList();
|
||||
template.setListener(new RepeatListenerSupport() {
|
||||
template.registerListener(new RepeatListenerSupport() {
|
||||
public void open(RepeatContext context) {
|
||||
calls.add("1");
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.springframework.batch.retry.RetryCallback;
|
||||
import org.springframework.batch.retry.RetryContext;
|
||||
import org.springframework.batch.retry.RetryListener;
|
||||
import org.springframework.batch.retry.exception.TerminatedRetryException;
|
||||
import org.springframework.batch.retry.listener.RetryListenerSupport;
|
||||
import org.springframework.batch.retry.policy.NeverRetryPolicy;
|
||||
import org.springframework.batch.retry.support.RetryTemplate;
|
||||
|
||||
@@ -62,7 +61,7 @@ public class RetryListenerTests extends TestCase {
|
||||
}
|
||||
|
||||
public void testOpenCanVetoRetry() throws Exception {
|
||||
template.setListener(new RetryListenerSupport() {
|
||||
template.registerListener(new RetryListenerSupport() {
|
||||
public boolean open(RetryContext context, RetryCallback callback) {
|
||||
list.add("1");
|
||||
return false;
|
||||
@@ -140,7 +139,7 @@ public class RetryListenerTests extends TestCase {
|
||||
}
|
||||
|
||||
public void testCloseInterceptorsAfterRetry() throws Exception {
|
||||
template.setListener(new RetryListenerSupport() {
|
||||
template.registerListener(new RetryListenerSupport() {
|
||||
public void close(RetryContext context, RetryCallback callback, Throwable t) {
|
||||
list.add("" + count);
|
||||
// The last attempt should have been successful:
|
||||
|
||||
Reference in New Issue
Block a user