From 7922c421ec9ddc68fca798b2aa9e481a05aa1c3d Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 3 Jan 2022 13:17:14 -0500 Subject: [PATCH] Fix TcpSenderTests for actual interceptors API --- .../ip/tcp/connection/TcpSenderTests.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpSenderTests.java b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpSenderTests.java index b34a48292d..b5451dcf0e 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpSenderTests.java +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpSenderTests.java @@ -25,6 +25,7 @@ import org.junit.jupiter.api.Test; /** * @author Gary Russell + * * @since 5.3.10 * */ @@ -70,14 +71,17 @@ public class TcpSenderTests { CountDownLatch adds = new CountDownLatch(2); CountDownLatch removes = new CountDownLatch(2); TcpConnectionInterceptorFactoryChain chain = new TcpConnectionInterceptorFactoryChain(); - chain.setInterceptor(new HelloWorldInterceptorFactory() { + chain.setInterceptors(new TcpConnectionInterceptorFactory[] { + new HelloWorldInterceptorFactory() { - @Override - public TcpConnectionInterceptorSupport getInterceptor() { - return new TcpConnectionInterceptorSupport() { - }; - } + @Override + public TcpConnectionInterceptorSupport getInterceptor() { + return new TcpConnectionInterceptorSupport() { + }; + } + + } }); client.setInterceptorFactoryChain(chain); client.registerSender(new TcpSender() {