Fix ReactiveStreamsConsumerTests and Checkstyle
Also increase timeouts in the `RedisAvailableRule`
This commit is contained in:
@@ -88,7 +88,14 @@ public class ReactiveStreamsConsumerTests {
|
||||
|
||||
reactiveConsumer.stop();
|
||||
|
||||
testChannel.send(testMessage);
|
||||
try {
|
||||
testChannel.send(testMessage);
|
||||
}
|
||||
catch (Exception e) {
|
||||
assertThat(e, instanceOf(MessageDeliveryException.class));
|
||||
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
|
||||
assertThat(e.getMessage(), containsString("doesn't have subscribers to accept messages"));
|
||||
}
|
||||
|
||||
reactiveConsumer.start();
|
||||
|
||||
@@ -246,7 +253,14 @@ public class ReactiveStreamsConsumerTests {
|
||||
|
||||
endpointFactoryBean.stop();
|
||||
|
||||
testChannel.send(testMessage);
|
||||
try {
|
||||
testChannel.send(testMessage);
|
||||
}
|
||||
catch (Exception e) {
|
||||
assertThat(e, instanceOf(MessageDeliveryException.class));
|
||||
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
|
||||
assertThat(e.getMessage(), containsString("doesn't have subscribers to accept messages"));
|
||||
}
|
||||
|
||||
endpointFactoryBean.start();
|
||||
|
||||
@@ -260,16 +274,4 @@ public class ReactiveStreamsConsumerTests {
|
||||
assertThat(result, Matchers.<Message<?>>contains(testMessage, testMessage2, testMessage2));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFluxMessageChannelSendWithoutSubscription() {
|
||||
try {
|
||||
new FluxMessageChannel().send(new GenericMessage<>("foo"));
|
||||
}
|
||||
catch (Exception e) {
|
||||
assertThat(e, instanceOf(MessageDeliveryException.class));
|
||||
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
|
||||
assertThat(e.getMessage(), containsString("doesn't have subscribers to accept messages"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user