From 45e9926ef823fc85eeedebb56252846bc6b62faa Mon Sep 17 00:00:00 2001 From: dsyer Date: Mon, 4 Aug 2008 09:12:15 +0000 Subject: [PATCH] Update for latest SI build (tests still broken) --- .../integration/retry/PollableSourceRetryTests.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/PollableSourceRetryTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/PollableSourceRetryTests.java index 7f94caee9..5952a3727 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/PollableSourceRetryTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/PollableSourceRetryTests.java @@ -39,8 +39,10 @@ import org.springframework.integration.message.MessageSource; import org.springframework.integration.message.MessageTarget; import org.springframework.integration.message.PollableSource; import org.springframework.integration.scheduling.PollingSchedule; -import org.springframework.integration.scheduling.SimpleTaskScheduler; +import org.springframework.integration.scheduling.SchedulableTask; import org.springframework.integration.scheduling.TaskScheduler; +import org.springframework.integration.scheduling.spi.ProviderTaskScheduler; +import org.springframework.integration.scheduling.spi.SimpleScheduleServiceProvider; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.util.StringUtils; @@ -427,8 +429,9 @@ public class PollableSourceRetryTests { return source; } - private TaskScheduler getSchedulerWithErrorHandler(Runnable task) { - SimpleTaskScheduler scheduler = new SimpleTaskScheduler(Executors.newSingleThreadScheduledExecutor()); + private TaskScheduler getSchedulerWithErrorHandler(SchedulableTask task) { + SimpleScheduleServiceProvider provider = new SimpleScheduleServiceProvider(Executors.newSingleThreadScheduledExecutor()); + TaskScheduler scheduler = new ProviderTaskScheduler(provider); // Workaround for INT-182 // scheduler.setErrorHandler(new ErrorHandler() { // public void handle(Throwable t) {