[
https://issues.apache.org/jira/browse/HDFS-9766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15166855#comment-15166855
]
Xiao Chen commented on HDFS-9766:
---------------------------------
Thanks [~liuml07] for creating this and analyzing the cause. I met the same
failure in [a precommit in
HDFS-9804|https://issues.apache.org/jira/browse/HDFS-9804?focusedCommentId=15166671&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15166671].
I think we can use a {{waitFor}} to fix the flakiness on sleep. I also think we
may need a better way than {{for (int x =0; x < 50; x++) }} to make sure the
metrics in fact increased.
Attached patch 1 to this direction. Please see if it makes sense to you.
> TestDataNodeMetrics#testDataNodeTimeSpend fails intermittently
> --------------------------------------------------------------
>
> Key: HDFS-9766
> URL: https://issues.apache.org/jira/browse/HDFS-9766
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: test
> Affects Versions: 3.0.0
> Reporter: Mingliang Liu
> Attachments: HDFS-9766.01.patch
>
>
> *Stacktrace*
> {code}
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.junit.Assert.assertTrue(Assert.java:52)
> at
> org.apache.hadoop.hdfs.server.datanode.TestDataNodeMetrics.testDataNodeTimeSpend(TestDataNodeMetrics.java:289)
> {code}
> See recent builds:
> *
> https://builds.apache.org/job/PreCommit-HDFS-Build/14393/testReport/org.apache.hadoop.hdfs.server.datanode/TestDataNodeMetrics/testDataNodeTimeSpend/
> *
> https://builds.apache.org/job/PreCommit-HDFS-Build/14317/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)