[ https://issues.apache.org/jira/browse/HDFS-9565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15060934#comment-15060934 ]
Mingliang Liu commented on HDFS-9565: ------------------------------------- +1 (non-binding) > TestDistributedFileSystem.testLocatedFileStatusStorageIdsTypes is flaky due > to race condition > --------------------------------------------------------------------------------------------- > > Key: HDFS-9565 > URL: https://issues.apache.org/jira/browse/HDFS-9565 > Project: Hadoop HDFS > Issue Type: Bug > Components: fs, test > Affects Versions: 3.0.0 > Environment: Jenkins > Reporter: Wei-Chiu Chuang > Assignee: Wei-Chiu Chuang > Priority: Minor > Attachments: HDFS-9565.001.patch > > > TestDistributedFileSystem.testLocatedFileStatusStorageIdsTypes occasionally > fails with the following error: > https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/699/testReport/org.apache.hadoop.hdfs/TestDistributedFileSystem/testLocatedFileStatusStorageIdsTypes/ > {noformat} > FAILED: > org.apache.hadoop.hdfs.TestDistributedFileSystem.testLocatedFileStatusStorageIdsTypes > Error Message: > Unexpected num storage ids expected:<2> but was:<1> > Stack Trace: > java.lang.AssertionError: Unexpected num storage ids expected:<2> but was:<1> > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:743) > at org.junit.Assert.assertEquals(Assert.java:118) > at org.junit.Assert.assertEquals(Assert.java:555) > at > org.apache.hadoop.hdfs.TestDistributedFileSystem.testLocatedFileStatusStorageIdsTypes(TestDistributedFileSystem.java:855) > {noformat} > It appears that this test failed due to race condition: it does not wait for > the file replication to finish, before checking the file's status. > This flaky test can be fixed by using DFSTestUtil.waitForReplication() -- This message was sent by Atlassian JIRA (v6.3.4#6332)