[ https://issues.apache.org/jira/browse/HDFS-4055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477596#comment-13477596 ]
Hudson commented on HDFS-4055: ------------------------------ Integrated in Hadoop-trunk-Commit #2879 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/2879/]) HDFS-4055. TestAuditLogs is flaky. Contributed by Binglin Chang (Revision 1399093) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1399093 Files : * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java > TestAuditLogs is flaky > ---------------------- > > Key: HDFS-4055 > URL: https://issues.apache.org/jira/browse/HDFS-4055 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Binglin Chang > Assignee: Binglin Chang > Fix For: 2.0.3-alpha > > 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