From 6e0e6daaf3215213c32cdffa79f3730d40e981ea Mon Sep 17 00:00:00 2001 From: Vinayakumar B Date: Fri, 12 Oct 2018 17:34:10 +0530 Subject: [PATCH] HDFS-13945. TestDataNodeVolumeFailure is Flaky. Contributed by Ayush Saxena. --- .../hdfs/server/datanode/TestDataNodeVolumeFailure.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java index 16c0cfaabe..7d04942f0e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java @@ -424,10 +424,8 @@ public void testUnderReplicationAfterVolFailure() throws Exception { @Override public Boolean get() { // underReplicatedBlocks are due to failed volumes - int underReplicatedBlocks = BlockManagerTestUtil - .checkHeartbeatAndGetUnderReplicatedBlocksCount( - cluster.getNamesystem(), bm); - + long underReplicatedBlocks = bm.getLowRedundancyBlocksCount() + + bm.getPendingReconstructionBlocksCount(); if (underReplicatedBlocks > 0) { return true; }