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:
parent
cddd6184ad
commit
3470dd9a2f
@ -284,6 +284,7 @@ public void testHedgedReadLoopTooManyTimes() throws IOException {
|
|||||||
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 Void answer(InvocationOnMock invocation) throws Throwable {
|
|||||||
} 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user