INT-1141 Improve on how MessageHandlers are stored
INT-1141 polished code INT-1141 added tests INT-1141 improved how iterator is obtaind from OrderAwareLikedHashSet INT-1141 polishing INT-1141 stashed commit with List-based collection and performance tests INT-1141 improved OrderedAwareLinkedHashSet INT-1141 polishing INT-1141, INT-2627 improved LoadBalancingStrategy and RoundRobinLoadBalancingStrategy to obtain handler's iterator faster INT-1141 improved getHandlerIterator method to ensure that it only executes reordering logic if there are more then one handler INT-1141 simplified OrderedAwareLinkedHashSet to not to extend from LinkedHashSet INT-1141 changed OrderedAwareLinkedHashSet to OrderedAwareCopyOnWriteArraySetTests, imporoved array creation in RoundRobinLoadBalancingStrategy INT-1141 polished failing tests and RoundRobinLoadBalancingStrategy. Removed 'transient' from OrderedAwareCopyOnWriteArraySet
This commit is contained in:
committed by
Gary Russell
parent
7dd1255351
commit
2b49c66f64
@@ -18,6 +18,8 @@ package org.springframework.integration.test.support;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasHeader;
|
||||
import static org.springframework.integration.test.matcher.PayloadMatcher.hasPayload;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -26,27 +28,24 @@ import org.springframework.integration.Message;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
import static org.springframework.integration.test.matcher.PayloadMatcher.hasPayload;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasHeader;
|
||||
|
||||
@ContextConfiguration
|
||||
@ContextConfiguration
|
||||
public class MessageScenariosTests extends AbstractRequestResponseScenarioTests {
|
||||
|
||||
|
||||
@Override
|
||||
protected List<RequestResponseScenario> defineRequestResponseScenarios() {
|
||||
List<RequestResponseScenario> scenarios= new ArrayList<RequestResponseScenario>();
|
||||
RequestResponseScenario scenario1 = new RequestResponseScenario(
|
||||
"inputChannel","outputChannel")
|
||||
.setPayload("hello")
|
||||
.setResponseValidator(new PayloadValidator<String>() {
|
||||
.setResponseValidator(new PayloadValidator<String>() {
|
||||
@Override
|
||||
protected void validateResponse(String response) {
|
||||
assertEquals("HELLO",response);
|
||||
}
|
||||
});
|
||||
|
||||
scenarios.add(scenario1);
|
||||
|
||||
|
||||
scenarios.add(scenario1);
|
||||
|
||||
RequestResponseScenario scenario2 = new RequestResponseScenario(
|
||||
"inputChannel","outputChannel")
|
||||
.setMessage(MessageBuilder.withPayload("hello").setHeader("foo", "bar").build())
|
||||
@@ -55,11 +54,11 @@ public class MessageScenariosTests extends AbstractRequestResponseScenarioTests
|
||||
protected void validateMessage(Message<?> message) {
|
||||
assertThat(message,hasPayload("HELLO"));
|
||||
assertThat(message,hasHeader("foo","bar"));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
scenarios.add(scenario2);
|
||||
|
||||
|
||||
scenarios.add(scenario2);
|
||||
|
||||
RequestResponseScenario scenario3 = new RequestResponseScenario(
|
||||
"inputChannel2","outputChannel2")
|
||||
.setMessage(MessageBuilder.withPayload("hello").setHeader("foo", "bar").build())
|
||||
@@ -68,11 +67,11 @@ public class MessageScenariosTests extends AbstractRequestResponseScenarioTests
|
||||
protected void validateMessage(Message<?> message) {
|
||||
assertThat(message,hasPayload("HELLO"));
|
||||
assertThat(message,hasHeader("foo","bar"));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
scenarios.add(scenario3);
|
||||
|
||||
|
||||
scenarios.add(scenario3);
|
||||
|
||||
return scenarios;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user