<i18n dev> RFR: 8368001: java/text/Format/NumberFormat/NumberRoundTrip.java timed out [v2]

Justin Lu jlu at openjdk.org
Fri Nov 21 17:47:44 UTC 2025


On Fri, 21 Nov 2025 13:07:26 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use jdk.test.lib.RandomFactory
>
> test/jdk/java/text/Format/NumberFormat/NumberRoundTrip.java line 143:
> 
>> 141:     // Return a random value from -range..+range.
>> 142:     private static double randomDouble(double range) {
>> 143:         double a = Math.random();
> 
> I would suggest using `jdk.test.lib.RandomFactory`, as this supports reproducible values in case of a randomised test failure.
> 
> 
> import jdk.test.lib.RandomFactory;
> ...
>  * @library /test/lib
>  * @build jdk.test.lib.RandomFactory
> ...
>     private static final Random RANDOM = RandomFactory.getRandom();
> ...
>     private static double randomDouble(double range) {
>         double a = RANDOM.nextDouble();
> ...

Thanks for the improvement, updated in https://github.com/openjdk/jdk/pull/28443/commits/dca988e7ddb51306c2f791eae5e9071c85796eb7.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28443#discussion_r2550523057


More information about the i18n-dev mailing list