Fix queue full exception in repeat template in CI build - use unbounded queue for results (will be bounded in practice by throttle limit anyway).

This commit is contained in:
dsyer
2008-05-29 10:58:09 +00:00
parent 59e57bed88
commit 56ddba0a7b
4 changed files with 17 additions and 20 deletions

View File

@@ -41,12 +41,16 @@ public class AsynchronousRepeatTests extends AbstractTradeBatchTests {
final String threadName = Thread.currentThread().getName();
final Set threadNames = new HashSet();
final RepeatCallback callback = new ItemReaderRepeatCallback(provider, processor) {
final RepeatCallback callback = new RepeatCallback() {
public ExitStatus doInIteration(RepeatContext context) throws Exception {
assertNotSame(threadName, Thread.currentThread().getName());
threadNames.add(Thread.currentThread().getName());
Thread.sleep(100);
return super.doInIteration(context);
Object item = provider.read();
if (item!=null) {
processor.write(item);
}
return new ExitStatus(item!=null);
}
};