RFR: 8326718: Test java/util/Formatter/Padding.java should timeout on large inputs before fix in JDK-8299677 [v2]
Raffaello Giulietti
rgiulietti at openjdk.org
Sat Mar 2 14:28:42 UTC 2024
On Wed, 28 Feb 2024 00:00:01 GMT, Chad Rakoczy <duke 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.
>
> Chad Rakoczy has updated the pull request incrementally with one additional commit since the last revision:
>
> Test updates
test/jdk/java/util/Formatter/Padding.java line 44:
> 42:
> 43: private static final String tenMillionZeros = "0".repeat(10000000);
> 44: private static final String tenMillionBlanks = " ".repeat(10000000);
Just a nit to help readability
Suggestion:
private static final String tenMillionZeros = "0".repeat(10_000_000);
private static final String tenMillionBlanks = " ".repeat(10_000_000);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18033#discussion_r1509251657
More information about the core-libs-dev
mailing list