diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRedundancyMonitor.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRedundancyMonitor.java index 0667e2611b..cfe7f41b6a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRedundancyMonitor.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRedundancyMonitor.java @@ -72,7 +72,7 @@ public void testChooseTargetWhenAllDataNodesStop() throws Throwable { NetworkTopology clusterMap = replicator.clusterMap; NetworkTopology spyClusterMap = spy(clusterMap); replicator.clusterMap = spyClusterMap; - doAnswer(delayer).when(spyClusterMap).getNumOfRacks(); + doAnswer(delayer).when(spyClusterMap).getNumOfNonEmptyRacks(); ExecutorService pool = Executors.newFixedThreadPool(2);