hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Antal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-15316) GenericTestUtils can exceed maxSleepTime
Date Thu, 12 Jul 2018 11:59:00 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-15316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16541523#comment-16541523
] 

Adam Antal commented on HADOOP-15316:
-------------------------------------

The failed test passes on my computer.

> 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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message