[ 
https://issues.apache.org/jira/browse/HDFS-4055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476673#comment-13476673
 ] 

Eli Collins commented on HDFS-4055:
-----------------------------------

+1  the test failure is unrelated, I filed HDFS-4060 for it.
                
> TestAuditLogs has some chances to fail.
> ---------------------------------------
>
>                 Key: HDFS-4055
>                 URL: https://issues.apache.org/jira/browse/HDFS-4055
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Binglin Chang
>            Assignee: Binglin Chang
>         Attachments: HDFS-4055-TestAuditLogs-bug.patch
>
>
> {code}
>     InputStream istream = webfs.open(file);
>     int val = istream.read();
>     istream.close();
>     verifyAuditLogsRepeat(true, 3);
>     assertTrue("failed to read from file", val >= 0);
> {code}
> {code}
>     byte[] toWrite = new byte[bufferLen];
>     Random rb = new Random(seed);
>     long bytesToWrite = fileLen;
>     while (bytesToWrite>0) {
>       rb.nextBytes(toWrite);
> {code}
> InputStream.read() return the first byte of the file, the bytes in the file 
> is generated in using Random.nextBytes(), so you get 1/256 chance the first 
> byte is 0, so some times it may fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to