|
34 | 34 | import java.io.InputStream;
|
35 | 35 | import java.lang.reflect.Method;
|
36 | 36 | import java.net.ConnectException;
|
| 37 | +import java.net.InetAddress; |
37 | 38 | import java.net.ServerSocket;
|
38 | 39 | import java.net.Socket;
|
39 | 40 | import java.net.SocketTimeoutException;
|
|
63 | 64 |
|
64 | 65 | import org.apache.commons.logging.Log;
|
65 | 66 | import org.apache.commons.logging.LogFactory;
|
66 |
| -import org.junit.jupiter.api.Disabled; |
67 | 67 | import org.junit.jupiter.api.Test;
|
68 | 68 | import org.junit.jupiter.api.TestInfo;
|
69 | 69 | import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
|
@@ -839,13 +839,12 @@ public void testNoDelayOnClose() throws Exception {
|
839 | 839 | }
|
840 | 840 |
|
841 | 841 | @Test
|
842 |
| - @Disabled("Until https://github.com/spring-projects/spring-integration/issues/3666") |
| 842 | + // todo: env vars? |
843 | 843 | public void testMultiAccept() throws InterruptedException, IOException {
|
844 | 844 | testMulti(true);
|
845 | 845 | }
|
846 | 846 |
|
847 | 847 | @Test
|
848 |
| - @Disabled("Until https://github.com/spring-projects/spring-integration/issues/3666") |
849 | 848 | public void testNoMultiAccept() throws InterruptedException, IOException {
|
850 | 849 | testMulti(false);
|
851 | 850 | }
|
@@ -874,8 +873,9 @@ private void testMulti(boolean multiAccept) throws InterruptedException, IOExcep
|
874 | 873 | server.afterPropertiesSet();
|
875 | 874 | server.start();
|
876 | 875 | assertThat(serverReadyLatch.await(10, TimeUnit.SECONDS)).isTrue();
|
| 876 | + InetAddress localHost = InetAddress.getLocalHost(); |
877 | 877 | for (int i = 0; i < 10; i++) {
|
878 |
| - Socket socket = SocketFactory.getDefault().createSocket("localhost", server.getPort()); |
| 878 | + Socket socket = SocketFactory.getDefault().createSocket(localHost, server.getPort()); |
879 | 879 | socket.getOutputStream().write("foo\r\n".getBytes());
|
880 | 880 | sockets.add(socket);
|
881 | 881 | }
|
|
0 commit comments