HDFS-6614. Addendum patch to shorten TestPread run time with smaller retry timeout setting. Contributed by Liang Xie.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1608846 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2014-07-08 16:43:16 +00:00
parent cddd6184ad
commit 3470dd9a2f
1 changed files with 2 additions and 1 deletions

View File

@ -284,6 +284,7 @@ public class TestPread {
numHedgedReadPoolThreads); numHedgedReadPoolThreads);
conf.setLong(DFSConfigKeys.DFS_DFSCLIENT_HEDGED_READ_THRESHOLD_MILLIS, conf.setLong(DFSConfigKeys.DFS_DFSCLIENT_HEDGED_READ_THRESHOLD_MILLIS,
hedgedReadTimeoutMillis); hedgedReadTimeoutMillis);
conf.setInt(DFSConfigKeys.DFS_CLIENT_RETRY_WINDOW_BASE, 0);
// Set up the InjectionHandler // Set up the InjectionHandler
DFSClientFaultInjector.instance = Mockito DFSClientFaultInjector.instance = Mockito
.mock(DFSClientFaultInjector.class); .mock(DFSClientFaultInjector.class);
@ -329,11 +330,11 @@ public class TestPread {
} catch (BlockMissingException e) { } catch (BlockMissingException e) {
assertTrue(false); assertTrue(false);
} finally { } finally {
Mockito.reset(injector);
IOUtils.cleanup(null, input); IOUtils.cleanup(null, input);
IOUtils.cleanup(null, output); IOUtils.cleanup(null, output);
fileSys.close(); fileSys.close();
cluster.shutdown(); cluster.shutdown();
Mockito.reset(injector);
} }
} }