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

GenericTestUtils can exceed maxSleepTime

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.2.0
    • None
    • None

    Description

      Probably shouldn't ever cause an issue, especially since Thread.sleep() can cause longer delays beyond your control anyway, but for larger values this could still behave unpredicatably in practice.

      Thread.sleep(r.nextInt(maxSleepTime) + minSleepTime);
      

      should be

      Thread.sleep(r.nextInt(maxSleepTime - minSleepTime) + minSleepTime)

       

      Attachments

        1. HADOOP-15316.001.patch
          0.8 kB
          Adam Antal

        Activity

          People

            adam.antal Adam Antal
            mackrorysd Sean Mackrory
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: