From 74d4a18735d2b54bdaddce0c51f8e173328fc014 Mon Sep 17 00:00:00 2001 From: Mingliang Liu Date: Sat, 25 Apr 2020 15:42:57 -0700 Subject: [PATCH] HDFS-15297. TestNNHandlesBlockReportPerStorage::blockReport_02 fails intermittently. Contributed by Ayush Saxena --- .../hadoop/hdfs/server/datanode/BlockReportTestBase.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java index e06be417734..f500ae0fe49 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java @@ -37,7 +37,6 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.slf4j.Logger; @@ -320,7 +319,7 @@ public abstract class BlockReportTestBase { } } - waitTil(TimeUnit.SECONDS.toMillis(DN_RESCAN_EXTRA_WAIT)); + DataNodeTestUtils.runDirectoryScanner(dn0); // all blocks belong to the same file, hence same BP String poolId = cluster.getNamesystem().getBlockPoolId();