INT-1105: re-organize CorrelatingMessageHandler constructors and formatting
This commit is contained in:
@@ -48,7 +48,7 @@ public class AggregatorTests {
|
||||
|
||||
@Before
|
||||
public void configureAggregator() {
|
||||
this.aggregator = new CorrelatingMessageHandler(new SimpleMessageStore(50), new MultiplyingProcessor());
|
||||
this.aggregator = new CorrelatingMessageHandler(new MultiplyingProcessor(), new SimpleMessageStore(50));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -211,7 +211,7 @@ public class AggregatorTests {
|
||||
|
||||
@Test
|
||||
public void testNullReturningAggregator() throws InterruptedException {
|
||||
this.aggregator = new CorrelatingMessageHandler(new SimpleMessageStore(50), new NullReturningMessageProcessor());
|
||||
this.aggregator = new CorrelatingMessageHandler(new NullReturningMessageProcessor(), new SimpleMessageStore(50));
|
||||
QueueChannel replyChannel = new QueueChannel();
|
||||
Message<?> message1 = createMessage(3, "ABC", 3, 1, replyChannel, null);
|
||||
Message<?> message2 = createMessage(5, "ABC", 3, 2, replyChannel, null);
|
||||
|
||||
@@ -54,8 +54,8 @@ public class ConcurrentAggregatorTests {
|
||||
@Before
|
||||
public void configureAggregator() {
|
||||
this.taskExecutor = new SimpleAsyncTaskExecutor();
|
||||
this.aggregator = new CorrelatingMessageHandler(new SimpleMessageStore(
|
||||
50), new MultiplyingProcessor());
|
||||
this.aggregator = new CorrelatingMessageHandler(new MultiplyingProcessor(), new SimpleMessageStore(
|
||||
50));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -269,8 +269,8 @@ public class ConcurrentAggregatorTests {
|
||||
|
||||
@Test
|
||||
public void testNullReturningAggregator() throws InterruptedException {
|
||||
this.aggregator = new CorrelatingMessageHandler(new SimpleMessageStore(
|
||||
50), new NullReturningMessageProcessor());
|
||||
this.aggregator = new CorrelatingMessageHandler(new NullReturningMessageProcessor(), new SimpleMessageStore(
|
||||
50));
|
||||
QueueChannel replyChannel = new QueueChannel();
|
||||
Message<?> message1 = createMessage(3, "ABC", 3, 1, replyChannel, null);
|
||||
Message<?> message2 = createMessage(5, "ABC", 3, 2, replyChannel, null);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class CorrelatingMessageHandlerIntegrationTest {
|
||||
|
||||
private MessageGroupProcessor processor = new PassThroughMessageGroupProcessor();
|
||||
|
||||
private CorrelatingMessageHandler defaultHandler = new CorrelatingMessageHandler(store, processor);
|
||||
private CorrelatingMessageHandler defaultHandler = new CorrelatingMessageHandler(processor, store);
|
||||
|
||||
@Before
|
||||
public void setupHandler() {
|
||||
|
||||
@@ -65,8 +65,8 @@ public class CorrelatingMessageHandlerTests {
|
||||
|
||||
@Before
|
||||
public void initializeSubject() {
|
||||
handler = new CorrelatingMessageHandler(new SimpleMessageStore(), correlationStrategy, ReleaseStrategy,
|
||||
processor);
|
||||
handler = new CorrelatingMessageHandler(processor, new SimpleMessageStore(), correlationStrategy,
|
||||
ReleaseStrategy);
|
||||
handler.setOutputChannel(outputChannel);
|
||||
doAnswer(new DoesNothing()).when(processor).processAndSend(isA(MessageGroup.class),
|
||||
isA(MessageChannelTemplate.class), eq(outputChannel));
|
||||
|
||||
@@ -218,6 +218,7 @@ public class MethodInvokingMessageGroupProcessorTests {
|
||||
testBean = (GreetingService) proxyFactory.getProxy();
|
||||
MethodInvokingMessageGroupProcessor aggregator = new MethodInvokingMessageGroupProcessor(testBean);
|
||||
CorrelatingMessageHandler handler = new CorrelatingMessageHandler(aggregator);
|
||||
handler.setReleaseStrategy(new MessageCountReleaseStrategy());
|
||||
handler.setOutputChannel(output);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(input, handler);
|
||||
endpoint.start();
|
||||
@@ -236,6 +237,7 @@ public class MethodInvokingMessageGroupProcessorTests {
|
||||
testBean = (GreetingService) proxyFactory.getProxy();
|
||||
MethodInvokingMessageGroupProcessor aggregator = new MethodInvokingMessageGroupProcessor(testBean);
|
||||
CorrelatingMessageHandler handler = new CorrelatingMessageHandler(aggregator);
|
||||
handler.setReleaseStrategy(new MessageCountReleaseStrategy());
|
||||
handler.setOutputChannel(output);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(input, handler);
|
||||
endpoint.start();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ResequencerTests {
|
||||
|
||||
@Before
|
||||
public void configureResequencer() {
|
||||
this.resequencer = new CorrelatingMessageHandler(store, processor, processor, processor);
|
||||
this.resequencer = new CorrelatingMessageHandler(processor, store, processor, processor);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user