From ce36fb468c9598f9f7ca88e5a41ecf0fad712885 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 25 May 2017 11:59:45 +0200 Subject: [PATCH] Increase getSocket() timeout in Socks5ClientForInitiatorTest This will hopefully reduce the false negatives when running the unit tests with Travis CI. --- .../bytestreams/socks5/Socks5ClientForInitiatorTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java index 7a7bab2f2..cd3e5201d 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java @@ -61,6 +61,8 @@ public class Socks5ClientForInitiatorTest { static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG; static final String loopbackAddress = InetAddress.getLoopbackAddress().getHostAddress(); + private static final int GET_SOCKET_TIMEOUT = 90 * 1000; + int proxyPort = 7890; String sessionID = "session_id"; @@ -111,7 +113,7 @@ public class Socks5ClientForInitiatorTest { connection, sessionID, targetJID); try { - socks5Client.getSocket(10000); + socks5Client.getSocket(GET_SOCKET_TIMEOUT); fail("exception should be thrown"); } @@ -175,7 +177,7 @@ public class Socks5ClientForInitiatorTest { Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest, connection, sessionID, targetJID); - Socket socket = socks5Client.getSocket(10000); + Socket socket = socks5Client.getSocket(GET_SOCKET_TIMEOUT); // verify test data InputStream in = socket.getInputStream(); @@ -224,7 +226,7 @@ public class Socks5ClientForInitiatorTest { try { - socks5Client.getSocket(10000); + socks5Client.getSocket(GET_SOCKET_TIMEOUT); fail("exception should be thrown"); }