Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6276

test-patch script should -1 patches that increase the number of Thread.sleep() calls in tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • test
    • None

    Description

      Calls to Thread.sleep() in tests are likely dubious. There are rare occasions where these are required, but in general they lead to flaky unit tests that fail sporadically. We used to be much better at code reviewing these out of patches, but have lost ground on that in the last few years (and our flaky unit tests show that!).

      I propose we have the test-patch script ensure that a patch does not add to the number of Thread.sleep() calls in tests by giving a -1 to patches that do increase it. I suggest this is a simple grep for lines containing "Thread.sleep(" and a "+" character in the first column.

      Attachments

        Activity

          People

            gkesavan Giridharan Kesavan
            nidaley Nigel Daley
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: