Fix test binder usage examples
The examples for testing Spring Cloud Stream in the presence of multiple bindings contain some mistakes that make the tests fail. Resolves #2070
This commit is contained in:
committed by
Oleg Zhurakousky
parent
d998c199a3
commit
8ac35f723f
@@ -2955,12 +2955,12 @@ public void testMultipleFunctions() {
|
||||
|
||||
Message<byte[]> inputMessage = MessageBuilder.withPayload("Hello".getBytes()).build();
|
||||
inputDestination.send(inputMessage, "uppercase-in-0");
|
||||
inputDestination.send(inputMessage, "uppercase-in-0");
|
||||
inputDestination.send(inputMessage, "reverse-in-0");
|
||||
|
||||
Message<byte[]> outputMessage = outputDestination.receive(0, "uppercase-out-0");
|
||||
assertThat(outputMessage.getPayload()).isEqualTo("HELLO".getBytes());
|
||||
|
||||
outputMessage = outputDestination.receive(0, "uppercase-out-0");
|
||||
outputMessage = outputDestination.receive(0, "reverse-out-0");
|
||||
assertThat(outputMessage.getPayload()).isEqualTo("olleH".getBytes());
|
||||
}
|
||||
}
|
||||
@@ -2978,7 +2978,7 @@ public void testMultipleFunctions() {
|
||||
.run(
|
||||
"--spring.cloud.function.definition=uppercase;reverse",
|
||||
"--spring.cloud.stream.bindings.uppercase-in-0.destination=myInput",
|
||||
"--spring.cloud.stream.bindings.uppercase-out-0.destination=myOutput",
|
||||
"--spring.cloud.stream.bindings.uppercase-out-0.destination=myOutput"
|
||||
)) {
|
||||
|
||||
InputDestination inputDestination = context.getBean(InputDestination.class);
|
||||
@@ -2986,12 +2986,12 @@ public void testMultipleFunctions() {
|
||||
|
||||
Message<byte[]> inputMessage = MessageBuilder.withPayload("Hello".getBytes()).build();
|
||||
inputDestination.send(inputMessage, "myInput");
|
||||
inputDestination.send(inputMessage, "myInput");
|
||||
inputDestination.send(inputMessage, "reverse-in-0");
|
||||
|
||||
Message<byte[]> outputMessage = outputDestination.receive(0, "myOutput");
|
||||
assertThat(outputMessage.getPayload()).isEqualTo("HELLO".getBytes());
|
||||
|
||||
outputMessage = outputDestination.receive(0, "myOutput");
|
||||
outputMessage = outputDestination.receive(0, "reverse-out-0");
|
||||
assertThat(outputMessage.getPayload()).isEqualTo("olleH".getBytes());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user