mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 08:12:05 +01:00
Increase getSocket() timeout in Socks5ClientForInitiatorTest
This will hopefully reduce the false negatives when running the unit tests with Travis CI.
This commit is contained in:
parent
d9e6f6130b
commit
ce36fb468c
1 changed files with 5 additions and 3 deletions
|
@ -61,6 +61,8 @@ public class Socks5ClientForInitiatorTest {
|
||||||
static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG;
|
static final DomainBareJid proxyJID = JidTestUtil.MUC_EXAMPLE_ORG;
|
||||||
static final String loopbackAddress = InetAddress.getLoopbackAddress().getHostAddress();
|
static final String loopbackAddress = InetAddress.getLoopbackAddress().getHostAddress();
|
||||||
|
|
||||||
|
private static final int GET_SOCKET_TIMEOUT = 90 * 1000;
|
||||||
|
|
||||||
int proxyPort = 7890;
|
int proxyPort = 7890;
|
||||||
String sessionID = "session_id";
|
String sessionID = "session_id";
|
||||||
|
|
||||||
|
@ -111,7 +113,7 @@ public class Socks5ClientForInitiatorTest {
|
||||||
connection, sessionID, targetJID);
|
connection, sessionID, targetJID);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
socks5Client.getSocket(10000);
|
socks5Client.getSocket(GET_SOCKET_TIMEOUT);
|
||||||
|
|
||||||
fail("exception should be thrown");
|
fail("exception should be thrown");
|
||||||
}
|
}
|
||||||
|
@ -175,7 +177,7 @@ public class Socks5ClientForInitiatorTest {
|
||||||
Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest,
|
Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest,
|
||||||
connection, sessionID, targetJID);
|
connection, sessionID, targetJID);
|
||||||
|
|
||||||
Socket socket = socks5Client.getSocket(10000);
|
Socket socket = socks5Client.getSocket(GET_SOCKET_TIMEOUT);
|
||||||
|
|
||||||
// verify test data
|
// verify test data
|
||||||
InputStream in = socket.getInputStream();
|
InputStream in = socket.getInputStream();
|
||||||
|
@ -224,7 +226,7 @@ public class Socks5ClientForInitiatorTest {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
socks5Client.getSocket(10000);
|
socks5Client.getSocket(GET_SOCKET_TIMEOUT);
|
||||||
|
|
||||||
fail("exception should be thrown");
|
fail("exception should be thrown");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue