RFR: 8253750: use build-stable default seed for Utils.RANDOM_GENERATOR [v3]
Igor Ignatyev
iignatyev at openjdk.java.net
Mon Oct 5 23:33:40 UTC 2020
On Mon, 5 Oct 2020 22:12:21 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>>> Can you take a look at the existing jdk.test.lib.RandomFactory and see if we can avoid a separate random number
>>> generator and property?
>>
>> I am not adding a new separate random number generator or a new property, `jdk.test.lib.Utils.getRandomInstance` has
>> been around for a long time and is used by lots of tests (most of them are in `/test/hotspot/jtreg`). merging
>> `Utils.getRandomInstance` and `RandomFactory` (or rather replacing one w/ another) is tracked by
>> [JDK-8212077](https://bugs.openjdk.java.net/browse/JDK-8212077).
>
> I was thinking that the code added to Utils.SEED initialization could just have easily been added to
> RandomFactory.getSystemSeed() and not have to be changed later.
well, `RandomFactory::getSystemSeed` reads `seed` property, while `Utils.SEED` reads `jdk.test.lib.random.seed`, and
there are tests which use these properties to specify seeds, I'd prefer to leave changing these tests to
[8212077](https://bugs.openjdk.java.net/browse/JDK-8212077). o/c we can add a new method, e.g.
`RandomFactory::getBuildStableSeed`, or refactor `RandomFactory::getSystemSeed` to take property name as an argument,
but I don't think it's really worth it as 8212077 is starting to slowly bubble up in my working queue.
-------------
PR: https://git.openjdk.java.net/jdk/pull/391
More information about the core-libs-dev
mailing list