HDFS-17557. Fix bug for TestRedundancyMonitor#testChooseTargetWhenAllDataNodesStop (#6897). Contributed by Haiyang Hu.
Some checks failed
website / build (push) Has been cancelled

Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
huhaiyang 2024-07-06 15:48:12 +08:00 committed by GitHub
parent 5a8f70a72e
commit 8ca4627a0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);