Skip to content

Commit 69f6e0e

Browse files
author
Tom McCormick
committed
Fixing test
1 parent efb263c commit 69f6e0e

File tree

1 file changed

+3
-1
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs

1 file changed

+3
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPread.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ public Void answer(InvocationOnMock invocation) throws Throwable {
603603
input.read(0, buffer, 0, 1024);
604604
Assert.fail("Reading the block should have thrown BlockMissingException");
605605
} catch (BlockMissingException e) {
606-
assertEquals(3, input.getHedgedReadOpsLoopNumForTesting());
606+
// The result of 9 is due to 2 blocks by 4 iterations plus one because hedgedReadOpsLoopNumForTesting
607+
// is incremented at start of the loop.
608+
assertEquals(9, input.getHedgedReadOpsLoopNumForTesting());
607609
assertTrue(metrics.getHedgedReadOps() == 0);
608610
} finally {
609611
Mockito.reset(injector);

0 commit comments

Comments
 (0)