aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2015-09-17 19:16:34 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2015-09-17 19:16:34 -0700
commit0f5ef6dfa67a068606aff8ea9d1addfce73446eb (patch)
tree0d45ec6fc49ef2623fa9b0b0b2fe76cbcb6fc91a /network
parent4fbf3328692e876f39ea78494510f9d9c5a53f15 (diff)
downloadspark-0f5ef6dfa67a068606aff8ea9d1addfce73446eb.tar.gz
spark-0f5ef6dfa67a068606aff8ea9d1addfce73446eb.tar.bz2
spark-0f5ef6dfa67a068606aff8ea9d1addfce73446eb.zip
[SPARK-10674] [TESTS] Increase timeouts in SaslIntegrationSuite.
1s seems to trigger too many times on the jenkins build boxes, so increase the timeout and cross fingers. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #8802 from vanzin/SPARK-10674 and squashes the following commits: 3c93117 [Marcelo Vanzin] Use java 7 syntax. d667d1b [Marcelo Vanzin] [SPARK-10674] [tests] Increase timeouts in SaslIntegrationSuite.
Diffstat (limited to 'network')
-rw-r--r--network/shuffle/src/test/java/org/apache/spark/network/sasl/SaslIntegrationSuite.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/network/shuffle/src/test/java/org/apache/spark/network/sasl/SaslIntegrationSuite.java b/network/shuffle/src/test/java/org/apache/spark/network/sasl/SaslIntegrationSuite.java
index 5cb0e4d4a6..c393a5e1e6 100644
--- a/network/shuffle/src/test/java/org/apache/spark/network/sasl/SaslIntegrationSuite.java
+++ b/network/shuffle/src/test/java/org/apache/spark/network/sasl/SaslIntegrationSuite.java
@@ -56,6 +56,11 @@ import org.apache.spark.network.util.SystemPropertyConfigProvider;
import org.apache.spark.network.util.TransportConf;
public class SaslIntegrationSuite {
+
+ // Use a long timeout to account for slow / overloaded build machines. In the normal case,
+ // tests should finish way before the timeout expires.
+ private final static long TIMEOUT_MS = 10_000;
+
static TransportServer server;
static TransportConf conf;
static TransportContext context;
@@ -102,7 +107,7 @@ public class SaslIntegrationSuite {
TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());
String msg = "Hello, World!";
- byte[] resp = client.sendRpcSync(msg.getBytes(), 1000);
+ byte[] resp = client.sendRpcSync(msg.getBytes(), TIMEOUT_MS);
assertEquals(msg, new String(resp)); // our rpc handler should just return the given msg
}
@@ -131,7 +136,7 @@ public class SaslIntegrationSuite {
TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());
try {
- client.sendRpcSync(new byte[13], 1000);
+ client.sendRpcSync(new byte[13], TIMEOUT_MS);
fail("Should have failed");
} catch (Exception e) {
assertTrue(e.getMessage(), e.getMessage().contains("Expected SaslMessage"));
@@ -139,7 +144,7 @@ public class SaslIntegrationSuite {
try {
// Guessing the right tag byte doesn't magically get you in...
- client.sendRpcSync(new byte[] { (byte) 0xEA }, 1000);
+ client.sendRpcSync(new byte[] { (byte) 0xEA }, TIMEOUT_MS);
fail("Should have failed");
} catch (Exception e) {
assertTrue(e.getMessage(), e.getMessage().contains("java.lang.IndexOutOfBoundsException"));
@@ -217,12 +222,12 @@ public class SaslIntegrationSuite {
new String[] { System.getProperty("java.io.tmpdir") }, 1,
"org.apache.spark.shuffle.sort.SortShuffleManager");
RegisterExecutor regmsg = new RegisterExecutor("app-1", "0", executorInfo);
- client1.sendRpcSync(regmsg.toByteArray(), 10000);
+ client1.sendRpcSync(regmsg.toByteArray(), TIMEOUT_MS);
// Make a successful request to fetch blocks, which creates a new stream. But do not actually
// fetch any blocks, to keep the stream open.
OpenBlocks openMessage = new OpenBlocks("app-1", "0", blockIds);
- byte[] response = client1.sendRpcSync(openMessage.toByteArray(), 10000);
+ byte[] response = client1.sendRpcSync(openMessage.toByteArray(), TIMEOUT_MS);
StreamHandle stream = (StreamHandle) BlockTransferMessage.Decoder.fromByteArray(response);
long streamId = stream.streamId;