fix the hanging build

This commit is contained in:
robokaso
2008-11-21 14:37:52 +00:00
parent df3a1204e6
commit cfcaf8c57c
2 changed files with 4 additions and 2 deletions

View File

@@ -234,7 +234,7 @@ public abstract class AbstractFaultTolerantChunkOrientedTasklet<I, O> extends Ab
public Object recover(RetryContext context) throws Exception {
Exception le = (Exception) context.getLastThrowable();
if (!writeSkipPolicy.shouldSkip(le, contribution.getSkipCount())) {
throw le;
throw new RetryException("Non-skippable exception in recoverer", le);
}
if (chunk.size() == 1) {
O item = chunk.get(0);

View File

@@ -43,6 +43,7 @@ import org.springframework.batch.item.ParseException;
import org.springframework.batch.item.UnexpectedInputException;
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;
import org.springframework.batch.repeat.support.RepeatTemplate;
import org.springframework.batch.retry.RetryException;
import org.springframework.batch.retry.policy.NeverRetryPolicy;
import org.springframework.batch.retry.support.RetryTemplate;
import org.springframework.batch.support.Classifier;
@@ -453,7 +454,8 @@ public class FaultTolerantChunkOrientedTaskletTests {
fail();
}
catch (Exception e) {
assertSame(ex, e);
assertTrue(e instanceof RetryException);
assertSame(ex, e.getCause());
}
/*