[ https://issues.apache.org/jira/browse/HADOOP-15316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539674#comment-16539674 ]
Sean Mackrory commented on HADOOP-15316: ---------------------------------------- Thanks for picking this up. The code looks good to me. +1 pending a clean Yetus run. > GenericTestUtils can exceed maxSleepTime > ---------------------------------------- > > Key: HADOOP-15316 > URL: https://issues.apache.org/jira/browse/HADOOP-15316 > Project: Hadoop Common > Issue Type: Bug > Reporter: Sean Mackrory > Assignee: Adam Antal > Priority: Trivial > Attachments: HADOOP-15316.001.patch > > > 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. > {code:java} > Thread.sleep(r.nextInt(maxSleepTime) + minSleepTime); > {code} > should be > {code:java} > Thread.sleep(r.nextInt(maxSleepTime - minSleepTime) + minSleepTime){code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org