diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPread.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPread.java index 135360e779f..0507a5dd352 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPread.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPread.java @@ -287,6 +287,7 @@ public class TestPread { numHedgedReadPoolThreads); conf.setLong(DFSConfigKeys.DFS_DFSCLIENT_HEDGED_READ_THRESHOLD_MILLIS, hedgedReadTimeoutMillis); + conf.setInt(DFSConfigKeys.DFS_CLIENT_RETRY_WINDOW_BASE, 0); // Set up the InjectionHandler DFSClientFaultInjector.instance = Mockito .mock(DFSClientFaultInjector.class); @@ -332,11 +333,11 @@ public class TestPread { } catch (BlockMissingException e) { assertTrue(false); } finally { + Mockito.reset(injector); IOUtils.cleanup(null, input); IOUtils.cleanup(null, output); fileSys.close(); cluster.shutdown(); - Mockito.reset(injector); } }