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

Über-jira: Unit tests should not use fixed sleep interval to wait for conditions

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

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • test
    • None

    Description

      There have been dozens of intermittent failing unit tests because they depend on fixed-interval sleep to wait for conditions to reach before assertion. This umbrella jira is to replace these sleep statements with:

      • GenericTestUtils.waitFor() to retry the conditions/assertions
      • Trigger internal state change of code to test, e.g. for MiniDFSCluster we can trigger {BlockReports,HeartBeats,DeletionReports}
      • Fails fast if specific exceptions are caught
      • Coordinate the JUnit thread with activities of the internal threads
      • ad-hoc fixes...

      p.s. I don't know how closures in Java 8 comes into play but I'd like to see any effort.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            liuml07 Mingliang Liu
            liuml07 Mingliang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment