HDFS-14189. Fix intermittent failure of TestNameNodeMetrics. Contributed by Ayush Saxena.

(cherry picked from commit 1a08302897bac18baf0f56b7d41ad54f63ae191b)
This commit is contained in:
Giovanni Matteo Fumarola 2019-01-08 10:38:06 -08:00 committed by Akira Ajisaka
parent b838647b16
commit 2f3c0b8dd1
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50

View File

@ -473,7 +473,7 @@ public void testCorruptBlock() throws Exception {
verifyZeroMetrics();
verifyAggregatedMetricsTally();
BlockManagerTestUtil.stopRedundancyThread(bm);
// Corrupt first replica of the block
LocatedBlock block = NameNodeAdapter.getBlockLocations(
cluster.getNameNode(), file.toString(), 0, 1).get(0);
@ -562,7 +562,7 @@ public void testStripedFileCorruptBlocks() throws Exception {
verifyZeroMetrics();
verifyAggregatedMetricsTally();
BlockManagerTestUtil.stopRedundancyThread(bm);
// Corrupt first replica of the block
LocatedBlocks lbs = fs.getClient().getNamenode().getBlockLocations(
ecFile.toString(), 0, fileLen);