IN PROGRESS - issue INT-567: Add round-robin dispatching strategy
http://jira.springframework.org/browse/INT-567 - Renamed LoadBalancingDispatcher to more explicit RoundRobinDispatcher - Removed round-robin option from xsd (not specifying a dispatcher yields the same)
This commit is contained in:
@@ -38,7 +38,7 @@ import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.core.MessagePriority;
|
||||
import org.springframework.integration.dispatcher.FailOverDispatcher;
|
||||
import org.springframework.integration.dispatcher.LoadBalancingDispatcher;
|
||||
import org.springframework.integration.dispatcher.RoundRobinDispatcher;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
import org.springframework.integration.message.MessageDeliveryException;
|
||||
@@ -75,7 +75,7 @@ public class ChannelParserTests {
|
||||
MessageChannel channel = (MessageChannel) context.getBean("defaultChannel");
|
||||
assertEquals(DirectChannel.class, channel.getClass());
|
||||
DirectFieldAccessor accessor = new DirectFieldAccessor(channel);
|
||||
assertThat(accessor.getPropertyValue("dispatcher"), is(LoadBalancingDispatcher.class));
|
||||
assertThat(accessor.getPropertyValue("dispatcher"), is(RoundRobinDispatcher.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<channel id="defaultChannel" />
|
||||
|
||||
<channel id="failOverChannel" dispatcher="fail-over"/>
|
||||
<channel id="failOverChannel" dispatcher="failover"/>
|
||||
|
||||
<publish-subscribe-channel id="publishSubscribeChannel" />
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ import org.springframework.integration.message.MessageHandler;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
@RunWith(MockitoJUnit44Runner.class)
|
||||
public class LoadBalancingDispatcherConcurrentTests {
|
||||
public class RoundRobinDispatcherConcurrentTests {
|
||||
|
||||
private static final int TOTAL_EXECUTIONS = 40;
|
||||
|
||||
private AbstractWinningHandlerDispatcher dispatcher = new LoadBalancingDispatcher();
|
||||
private AbstractWinningHandlerDispatcher dispatcher = new RoundRobinDispatcher();
|
||||
|
||||
private ThreadPoolTaskExecutor scheduler = new ThreadPoolTaskExecutor();
|
||||
|
||||
@@ -33,9 +33,9 @@ import org.springframework.integration.message.MessageHandler;
|
||||
*
|
||||
*/
|
||||
@RunWith(MockitoJUnit44Runner.class)
|
||||
public class LoadBalancingDispatcherTests {
|
||||
public class RoundRobinDispatcherTests {
|
||||
|
||||
private AbstractWinningHandlerDispatcher dispatcher = new LoadBalancingDispatcher();
|
||||
private AbstractWinningHandlerDispatcher dispatcher = new RoundRobinDispatcher();
|
||||
|
||||
@Mock
|
||||
private MessageHandler handler;
|
||||
Reference in New Issue
Block a user