diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestRedudantBlocks.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestRedudantBlocks.java index 943699aaa7..ac25da3fbd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestRedudantBlocks.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestRedudantBlocks.java @@ -58,7 +58,7 @@ public class TestRedudantBlocks { private final int cellSize = ecPolicy.getCellSize(); private final int stripesPerBlock = 4; private final int blockSize = stripesPerBlock * cellSize; - private final int numDNs = groupSize + 1; + private final int numDNs = groupSize; @Before public void setup() throws IOException { @@ -110,12 +110,16 @@ public void testProcessOverReplicatedAndRedudantBlock() throws Exception { // update blocksMap cluster.triggerBlockReports(); - // add to invalidates + // delete redundant block cluster.triggerHeartbeats(); - // datanode delete block + //wait for IBR + Thread.sleep(1100); + + // trigger reconstruction cluster.triggerHeartbeats(); - // update blocksMap - cluster.triggerBlockReports(); + + //wait for IBR + Thread.sleep(1100); HashSet blockIdsSet = new HashSet();