<i18n dev> RFR: 8326718: Test java/util/Formatter/Padding.java does not timeout on large inputs before JDK-8299677

Chad Rakoczy duke at openjdk.org
Tue Feb 27 19:23:52 UTC 2024


On Tue, 27 Feb 2024 19:13:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> [JDK-8299677](https://bugs.openjdk.java.net/browse/JDK-8299677) fixes a bug with Formatter.format taking a long time when there is a lot of padding. This test runs Formatter.format with very large padding. Test fails before [JDK-8299677](https://bugs.openjdk.java.net/browse/JDK-8299677) and passes after.
>> 
>> Timeout for the test was set to 10 seconds. Test passes locally with as low as 1 (after [JDK-8299677](https://bugs.openjdk.java.net/browse/JDK-8299677)) and fails as high as 120 (before [JDK-8299677](https://bugs.openjdk.java.net/browse/JDK-8299677)) so it should be consistent.
>
> test/jdk/java/util/Formatter/Padding.java line 29:
> 
>> 27:  * @summary Tests to excercise padding on int and double values,
>> 28:  *      with various flag combinations.
>> 29:  * @run junit/timeout=10 Padding
> 
> /timeout=10 looks problematic, I don't think you want that.

What is the issue with this? Is there a different way to set a timeout? The test tests that format does not take a long time to run so I would like to have a timeout

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18033#discussion_r1504833617


More information about the i18n-dev mailing list