[ 
https://issues.apache.org/jira/browse/HDFS-10934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Badger updated HDFS-10934:
-------------------------------
    Attachment: HDFS-10934.001.patch

After talking offline with [~daryn], we came to the conclusion that the test 
isn't completely valid. The test creates a file and stores the modification 
time. Then they do a stat on the directory to make sure that the times are the 
same. However, the file is closed in between those two things happening and so 
the file modification time is updated. Closing the file doesn't update the 
modification time on the directory, so the times are not the same. 

I'm attaching a patch that creates a file, but leaves it open. This way the 
modification time of the file will be the same of the modification time of the 
directory. 

cc [~liuml07]

> TestDFSShell.testStat fails intermittently
> ------------------------------------------
>
>                 Key: HDFS-10934
>                 URL: https://issues.apache.org/jira/browse/HDFS-10934
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            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

Reply via email to