[
https://issues.apache.org/jira/browse/LUCENE-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14704619#comment-14704619
]
Dawid Weiss commented on LUCENE-4212:
-------------------------------------
Well spotted, Mikhail. I think {{Math.random()}} could be banned -- I think
it's an oversight. {{new Random(long)}} is sometimes handy if you have tight
loops with super large numbers of repetitions (in which case the randomized
context's Random may be slow because it runs certain sanity checks).
> Tests should not use new Random() without args
> ----------------------------------------------
>
> Key: LUCENE-4212
> URL: https://issues.apache.org/jira/browse/LUCENE-4212
> Project: Lucene - Core
> Issue Type: Improvement
> Components: general/build
> Reporter: Robert Muir
> Fix For: 4.0-ALPHA, Trunk
>
> Attachments: LUCENE-4212.patch, LUCENE-4212.patch, LUCENE-4212.patch,
> LUCENE-4212.patch
>
>
> They should be using random() etc, and if they create one, it should pass in
> a seed.
> Otherwise, they probably won't reproduce.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]