Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4055

TestAuditLogs is flaky

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.3-alpha
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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

        Issue Links

          Activity

            People

            • Assignee:
              decster Binglin Chang
              Reporter:
              decster Binglin Chang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment