HDFS-6610. TestShortCircuitLocalRead tests sometimes timeout on slow machines. Contributed by Charles Lamb.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1607496 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Wang 2014-07-02 23:02:24 +00:00
parent 3047336791
commit 9b5d551ad9
2 changed files with 11 additions and 7 deletions

View File

@ -490,6 +490,9 @@ Release 2.5.0 - UNRELEASED
HDFS-6614. shorten TestPread run time with a smaller retry timeout setting. HDFS-6614. shorten TestPread run time with a smaller retry timeout setting.
(Liang Xie via cnauroth) (Liang Xie via cnauroth)
HDFS-6610. TestShortCircuitLocalRead tests sometimes timeout on slow
machines. (Charles Lamb via wang)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn) HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)

View File

@ -291,17 +291,17 @@ public class TestShortCircuitLocalRead {
} }
} }
@Test(timeout=10000) @Test(timeout=60000)
public void testFileLocalReadNoChecksum() throws Exception { public void testFileLocalReadNoChecksum() throws Exception {
doTestShortCircuitRead(true, 3*blockSize+100, 0); doTestShortCircuitRead(true, 3*blockSize+100, 0);
} }
@Test(timeout=10000) @Test(timeout=60000)
public void testFileLocalReadChecksum() throws Exception { public void testFileLocalReadChecksum() throws Exception {
doTestShortCircuitRead(false, 3*blockSize+100, 0); doTestShortCircuitRead(false, 3*blockSize+100, 0);
} }
@Test(timeout=10000) @Test(timeout=60000)
public void testSmallFileLocalRead() throws Exception { public void testSmallFileLocalRead() throws Exception {
doTestShortCircuitRead(false, 13, 0); doTestShortCircuitRead(false, 13, 0);
doTestShortCircuitRead(false, 13, 5); doTestShortCircuitRead(false, 13, 5);
@ -309,7 +309,7 @@ public class TestShortCircuitLocalRead {
doTestShortCircuitRead(true, 13, 5); doTestShortCircuitRead(true, 13, 5);
} }
@Test(timeout=10000) @Test(timeout=60000)
public void testLocalReadLegacy() throws Exception { public void testLocalReadLegacy() throws Exception {
doTestShortCircuitReadLegacy(true, 13, 0, getCurrentUser(), doTestShortCircuitReadLegacy(true, 13, 0, getCurrentUser(),
getCurrentUser(), false); getCurrentUser(), false);
@ -320,18 +320,18 @@ public class TestShortCircuitLocalRead {
* to use short circuit. The test ensures reader falls back to non * to use short circuit. The test ensures reader falls back to non
* shortcircuit reads when shortcircuit is disallowed. * shortcircuit reads when shortcircuit is disallowed.
*/ */
@Test(timeout=10000) @Test(timeout=60000)
public void testLocalReadFallback() throws Exception { public void testLocalReadFallback() throws Exception {
doTestShortCircuitReadLegacy(true, 13, 0, getCurrentUser(), "notallowed", true); doTestShortCircuitReadLegacy(true, 13, 0, getCurrentUser(), "notallowed", true);
} }
@Test(timeout=10000) @Test(timeout=60000)
public void testReadFromAnOffset() throws Exception { public void testReadFromAnOffset() throws Exception {
doTestShortCircuitRead(false, 3*blockSize+100, 777); doTestShortCircuitRead(false, 3*blockSize+100, 777);
doTestShortCircuitRead(true, 3*blockSize+100, 777); doTestShortCircuitRead(true, 3*blockSize+100, 777);
} }
@Test(timeout=10000) @Test(timeout=60000)
public void testLongFile() throws Exception { public void testLongFile() throws Exception {
doTestShortCircuitRead(false, 10*blockSize+100, 777); doTestShortCircuitRead(false, 10*blockSize+100, 777);
doTestShortCircuitRead(true, 10*blockSize+100, 777); doTestShortCircuitRead(true, 10*blockSize+100, 777);
@ -578,6 +578,7 @@ public class TestShortCircuitLocalRead {
fs.delete(file1, false); fs.delete(file1, false);
} }
@Test(timeout=60000)
public void testReadWithRemoteBlockReader() throws IOException, InterruptedException { public void testReadWithRemoteBlockReader() throws IOException, InterruptedException {
doTestShortCircuitReadWithRemoteBlockReader(true, 3*blockSize+100, getCurrentUser(), 0, false); doTestShortCircuitReadWithRemoteBlockReader(true, 3*blockSize+100, getCurrentUser(), 0, false);
} }