From 936fc3f3c2604c94968a25a8cf6706cbb3dad6a0 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Wed, 24 Oct 2018 16:18:27 -0700 Subject: [PATCH] HDFS-14025. TestPendingReconstruction.testPendingAndInvalidate fails. Contributed by Ayush Saxena. --- .../hdfs/server/blockmanagement/TestPendingReconstruction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReconstruction.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReconstruction.java index dc37ec062e..d7c693f8b2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReconstruction.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingReconstruction.java @@ -441,6 +441,8 @@ public void testPendingAndInvalidate() throws Exception { // 1. create a file Path filePath = new Path("/tmp.txt"); DFSTestUtil.createFile(fs, filePath, 1024, (short) 3, 0L); + DFSTestUtil.waitForReplication(cluster.getFileSystem(), filePath, + (short) 3, 10000); // 2. disable the heartbeats for (DataNode dn : cluster.getDataNodes()) {