RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v2]

Roger Riggs rriggs at openjdk.org
Tue May 30 21:01:57 UTC 2023


On Tue, 30 May 2023 09:15:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> UUID is very important class that is used to track identities of objects in large scale systems. Yet, the coverage in JDK test is disappointing: it tests only 100 of UUID instances per test, which is way too small to detect collisions due to the bad randomness for example.
>> 
>> I have some pending work to improve UUID performance, and tests should be improved. 
>> 
>> The improved test still runs in less than 5 seconds on my laptop.
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments

test/jdk/java/util/UUID/UUIDTest.java line 79:

> 77:             }
> 78:             if (!set.add(u)) {
> 79:                 throw new Exception("UUID collision: " + u);

I would be concerned that if this failure was reported, it would be intermittent, hard to track down, and not reproducible.  Without a hook for the generator and the seed, its just going to be noise in the testing.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14134#discussion_r1210815388


More information about the core-libs-dev mailing list