aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorShixiong Zhu <shixiong@databricks.com>2016-03-19 12:35:35 -0700
committerYin Huai <yhuai@databricks.com>2016-03-19 12:35:35 -0700
commitd630a203d696cb9457ca05dd40db3faa81f0ad64 (patch)
tree30fda469af25745b38907394468dae21b0d9e8da /common
parentdcaa016610ac2c11d7dd01803f3515b02ab32e64 (diff)
downloadspark-d630a203d696cb9457ca05dd40db3faa81f0ad64.tar.gz
spark-d630a203d696cb9457ca05dd40db3faa81f0ad64.tar.bz2
spark-d630a203d696cb9457ca05dd40db3faa81f0ad64.zip
[SPARK-10680][TESTS] Increase 'connectionTimeout' to make RequestTimeoutIntegrationSuite more stable
## What changes were proposed in this pull request? Increase 'connectionTimeout' to make RequestTimeoutIntegrationSuite more stable ## How was this patch tested? Existing unit tests Author: Shixiong Zhu <shixiong@databricks.com> Closes #11833 from zsxwing/SPARK-10680.
Diffstat (limited to 'common')
-rw-r--r--common/network-common/src/test/java/org/apache/spark/network/RequestTimeoutIntegrationSuite.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/network-common/src/test/java/org/apache/spark/network/RequestTimeoutIntegrationSuite.java b/common/network-common/src/test/java/org/apache/spark/network/RequestTimeoutIntegrationSuite.java
index dd0171d1d1..959396bb8c 100644
--- a/common/network-common/src/test/java/org/apache/spark/network/RequestTimeoutIntegrationSuite.java
+++ b/common/network-common/src/test/java/org/apache/spark/network/RequestTimeoutIntegrationSuite.java
@@ -44,7 +44,7 @@ import java.util.concurrent.TimeUnit;
* Suite which ensures that requests that go without a response for the network timeout period are
* failed, and the connection closed.
*
- * In this suite, we use 2 seconds as the connection timeout, with some slack given in the tests,
+ * In this suite, we use 10 seconds as the connection timeout, with some slack given in the tests,
* to ensure stability in different test environments.
*/
public class RequestTimeoutIntegrationSuite {
@@ -61,7 +61,7 @@ public class RequestTimeoutIntegrationSuite {
@Before
public void setUp() throws Exception {
Map<String, String> configMap = Maps.newHashMap();
- configMap.put("spark.shuffle.io.connectionTimeout", "2s");
+ configMap.put("spark.shuffle.io.connectionTimeout", "10s");
conf = new TransportConf("shuffle", new MapConfigProvider(configMap));
defaultManager = new StreamManager() {
@@ -118,10 +118,10 @@ public class RequestTimeoutIntegrationSuite {
callback0.latch.await();
assertEquals(responseSize, callback0.successLength);
- // Second times out after 2 seconds, with slack. Must be IOException.
+ // Second times out after 10 seconds, with slack. Must be IOException.
TestCallback callback1 = new TestCallback();
client.sendRpc(ByteBuffer.allocate(0), callback1);
- callback1.latch.await(4, TimeUnit.SECONDS);
+ callback1.latch.await(60, TimeUnit.SECONDS);
assertNotNull(callback1.failure);
assertTrue(callback1.failure instanceof IOException);
@@ -223,7 +223,7 @@ public class RequestTimeoutIntegrationSuite {
// not complete yet, but should complete soon
assertEquals(-1, callback0.successLength);
assertNull(callback0.failure);
- callback0.latch.await(2, TimeUnit.SECONDS);
+ callback0.latch.await(60, TimeUnit.SECONDS);
assertTrue(callback0.failure instanceof IOException);
// failed at same time as previous