[ https://issues.apache.org/jira/browse/HDFS-10934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15537088#comment-15537088 ]
Mingliang Liu commented on HDFS-10934: -------------------------------------- Changing the status2 from {{testDir1}} to {{testFile2}} is not enough. We have to also move it after creating files (or leave it open) as creating a new file will change the modification time of its parent directory. I assumed the file/directory last modification time (though never asserted) would be the same because of this. And it turned out to be not reliable. You're right that closing the file will change the file modification time but not its parent directory. And they may differ. So I thought 1) mkdir, 2) create file (and close it), 3) get file and dir status, and 4) do the assertions against respective mtimes were preferred to fix this. Thanks. > TestDFSShell.testStat fails intermittently > ------------------------------------------ > > Key: HDFS-10934 > URL: https://issues.apache.org/jira/browse/HDFS-10934 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: test > Reporter: Eric Badger > Assignee: Eric Badger > Attachments: HDFS-10934.001.patch > > > Saw this failure in an internal build. Reran the test 30 times and it failed > once with the same type of failure. > {noformat} > org.junit.ComparisonFailure: Unexpected -stat output: 2016-09-30 03:48:56 > 2016-09-30 03:48:57 > expected:<...6 > 2016-09-30 03:48:5[7] > > but was:<...6 > 2016-09-30 03:48:5[6] > > > at org.junit.Assert.assertEquals(Assert.java:115) > at org.apache.hadoop.hdfs.TestDFSShell.testStat(TestDFSShell.java:2082) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org