Skip to content

Commit 5c36fca

Browse files
committed
HDFS-4338. TestNameNodeMetrics#testCorruptBlock is flaky. Contributed by Andrew Wang.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1428144 13f79535-47bb-0310-9956-ffa450edef68
1 parent ccee30b commit 5c36fca

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ Trunk (Unreleased)
288288
HDFS-4275. MiniDFSCluster-based tests fail on Windows due to failure
289289
to delete test namenode directory. (Chris Nauroth via suresh)
290290

291+
HDFS-4338. TestNameNodeMetrics#testCorruptBlock is flaky. (Andrew Wang via
292+
atm)
293+
291294
Release 2.0.3-alpha - Unreleased
292295

293296
INCOMPATIBLE CHANGES

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,9 @@ public void testCorruptBlock() throws Exception {
222222
cluster.getNamesystem().writeUnlock();
223223
}
224224
BlockManagerTestUtil.getComputedDatanodeWork(bm);
225-
BlockManagerTestUtil.updateState(bm);
226225
MetricsRecordBuilder rb = getMetrics(NS_METRICS);
227226
assertGauge("CorruptBlocks", 1L, rb);
228227
assertGauge("PendingReplicationBlocks", 1L, rb);
229-
assertGauge("ScheduledReplicationBlocks", 1L, rb);
230228

231229
fs.delete(file, true);
232230
// During the file deletion, both BlockManager#corruptReplicas and
@@ -235,7 +233,7 @@ public void testCorruptBlock() throws Exception {
235233
// corruptReplicas and pendingReplications. The corresponding
236234
// metrics (CorruptBlocks and PendingReplicationBlocks) will only be updated
237235
// when BlockManager#computeDatanodeWork is run where the
238-
// BlockManager#udpateState is called. And in
236+
// BlockManager#updateState is called. And in
239237
// BlockManager#computeDatanodeWork the metric ScheduledReplicationBlocks
240238
// will also be updated.
241239
rb = waitForDnMetricValue(NS_METRICS, "CorruptBlocks", 0L);

0 commit comments

Comments
 (0)