Fix missing @DirtiesContext on TCP tests
- also add bean name (if available) to the gateway timeout exception message.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2020 the original author or authors.
|
||||
* Copyright 2001-2021 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.
|
||||
@@ -288,7 +288,9 @@ public class TcpOutboundGateway extends AbstractReplyProducingMessageHandler
|
||||
logger.debug(() -> "Remote Timeout on " + connectionId);
|
||||
// The connection is dirty - force it closed.
|
||||
this.connectionFactory.forceClose(connection);
|
||||
throw new MessageTimeoutException(requestMessage, "Timed out waiting for response");
|
||||
String component = getComponentName();
|
||||
throw new MessageTimeoutException(requestMessage, "Timed out waiting for response"
|
||||
+ (component == null ? "" : "; component: " + component));
|
||||
}
|
||||
logger.debug(() -> "Response " + replyMessage);
|
||||
return replyMessage;
|
||||
|
||||
Reference in New Issue
Block a user