Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
InputStream istream = webfs.open(file); int val = istream.read(); istream.close(); verifyAuditLogsRepeat(true, 3); assertTrue("failed to read from file", val >= 0);
byte[] toWrite = new byte[bufferLen]; Random rb = new Random(seed); long bytesToWrite = fileLen; while (bytesToWrite>0) { rb.nextBytes(toWrite);
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.
Attachments
Attachments
Issue Links
- duplicates
-
HDFS-3984 TestAuditLogs#testAuditWebHdfs flaky
- Resolved