From 2a5ddabd26cb90a4538abddbcb2e428518088b21 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Tue, 28 Jun 2022 12:44:40 -0400 Subject: [PATCH] More test fixes for latest SF compatibility --- .../mongodb/outbound/MongoDbOutboundGatewayTests.java | 2 +- .../StompMessageHandlerWebSocketIntegrationTests.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/outbound/MongoDbOutboundGatewayTests.java b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/outbound/MongoDbOutboundGatewayTests.java index 343b2abd0d..62bf33d098 100644 --- a/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/outbound/MongoDbOutboundGatewayTests.java +++ b/spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/outbound/MongoDbOutboundGatewayTests.java @@ -98,7 +98,7 @@ public class MongoDbOutboundGatewayTests extends MongoDbAvailableTests { public void testNoFactorySpecified() { assertThatIllegalArgumentException() .isThrownBy(() -> new MongoDbOutboundGateway((MongoDatabaseFactory) null)) - .withStackTraceContaining("MongoDbFactory translator must not be null!"); + .withStackTraceContaining("MongoDbFactory translator must not be null"); } @Test diff --git a/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java b/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java index 0283545c06..ab982f54e5 100644 --- a/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java +++ b/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2020 the original author or authors. + * Copyright 2015-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -138,7 +138,8 @@ public class StompMessageHandlerWebSocketIntegrationTests { assertThat(cause).isInstanceOf(MessageDeliveryException.class); MessageDeliveryException messageDeliveryException = (MessageDeliveryException) cause; Message failedMessage = messageDeliveryException.getFailedMessage(); - assertThat((String) failedMessage.getPayload()).contains("preSend intentional Exception"); + assertThat((String) failedMessage.getPayload()) + .contains("Failed to send message to ExecutorSubscribableChannel[clientInboundChannel]"); receive = this.stompEvents.receive(10000); assertThat(receive).isNotNull();