Skip to content

[SPARK-10680][Tests]Increase 'connectionTimeout' to make RequestTimeoutIntegrationSuite more stable #11833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* 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 {
Expand All @@ -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() {
Expand Down Expand Up @@ -118,10 +118,10 @@ public StreamManager getStreamManager() {
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);

Expand Down Expand Up @@ -223,7 +223,7 @@ public StreamManager getStreamManager() {
// 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
Expand Down