GH-2364 fix intermittent failing test
Resolves https://github.com/spring-projects/spring-integration/issues/2364
This commit is contained in:
committed by
Gary Russell
parent
4397807a57
commit
4bb4a0187a
@@ -45,6 +45,7 @@ import org.springframework.util.ErrorHandler;
|
||||
/**
|
||||
* @author Iwein Fuld
|
||||
* @author Mark Fisher
|
||||
* @author Kiel Boatman
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class PollingConsumerEndpointTests {
|
||||
@@ -63,13 +64,14 @@ public class PollingConsumerEndpointTests {
|
||||
|
||||
private final TestErrorHandler errorHandler = new TestErrorHandler();
|
||||
|
||||
private final PollableChannel channelMock = Mockito.mock(PollableChannel.class);
|
||||
private PollableChannel channelMock;
|
||||
|
||||
private final ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
|
||||
|
||||
|
||||
@Before
|
||||
public void init() throws Exception {
|
||||
channelMock = Mockito.mock(PollableChannel.class);
|
||||
consumer.counter.set(0);
|
||||
trigger.reset();
|
||||
endpoint = new PollingConsumer(channelMock, consumer);
|
||||
@@ -81,7 +83,6 @@ public class PollingConsumerEndpointTests {
|
||||
endpoint.setReceiveTimeout(-1);
|
||||
endpoint.afterPropertiesSet();
|
||||
taskScheduler.afterPropertiesSet();
|
||||
Mockito.reset(channelMock);
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user