From bc400c8a339ffc16828d651e1fbb33a2075a25b3 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Tue, 9 Oct 2018 17:03:21 -0700 Subject: [PATCH] HDFS-11396. TestNameNodeMetadataConsistency#testGenerationStampInFuture timed out. Contributed by Ayush Saxena. --- .../hdfs/server/namenode/TestNameNodeMetadataConsistency.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetadataConsistency.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetadataConsistency.java index ff49ddfaaf5..2677781babc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetadataConsistency.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMetadataConsistency.java @@ -27,6 +27,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo; import org.apache.hadoop.hdfs.server.blockmanagement.BlockManagerTestUtil; +import org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils; import org.apache.hadoop.test.GenericTestUtils; import com.google.common.base.Supplier; @@ -88,6 +89,7 @@ public class TestNameNodeMetadataConsistency { final long genStamp = block.getGenerationStamp(); final int datanodeIndex = 0; cluster.changeGenStampOfBlock(datanodeIndex, block, genStamp + 1); + DataNodeTestUtils.runDirectoryScanner(cluster.getDataNodes().get(0)); // stop the data node so that it won't remove block final DataNodeProperties dnProps = cluster.stopDataNode(datanodeIndex);