lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4212) Tests should not use new Random() without args
Date Thu, 20 Aug 2015 09:59:46 GMT


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:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message