Skip to content

Commit d6a4422

Browse files
committed
GH-536: Fix test for backport
1 parent dc51a8c commit d6a4422

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/FailoverClientConnectionFactoryTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ void failoverAllDeadAfterSuccess() throws Exception {
220220
});
221221
TcpNetClientConnectionFactory cf1 = new TcpNetClientConnectionFactory("localhost", ss1.getLocalPort());
222222
AbstractClientConnectionFactory cf2 = mock(AbstractClientConnectionFactory.class);
223+
List<AbstractClientConnectionFactory> factories = new ArrayList<AbstractClientConnectionFactory>();
224+
factories.add(cf1);
225+
factories.add(cf2);
223226
doThrow(new UncheckedIOException(new IOException("fail"))).when(cf2).getConnection();
224227
CountDownLatch latch = new CountDownLatch(2);
225228
cf1.setApplicationEventPublisher(event -> {
@@ -228,7 +231,7 @@ void failoverAllDeadAfterSuccess() throws Exception {
228231
}
229232
});
230233
cf2.setApplicationEventPublisher(event -> { });
231-
FailoverClientConnectionFactory fccf = new FailoverClientConnectionFactory(List.of(cf1, cf2));
234+
FailoverClientConnectionFactory fccf = new FailoverClientConnectionFactory(factories);
232235
fccf.registerListener(msf -> {
233236
latch.countDown();
234237
return false;

0 commit comments

Comments
 (0)