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

    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

          There are no Sub-Tasks for this issue.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: