<i18n dev> RFR: 8328037: Test java/util/Formatter/Padding.java has unnecessary high heap requirement after JDK-8326718
Raffaello Giulietti
rgiulietti at openjdk.org
Wed Mar 13 13:18:13 UTC 2024
On Wed, 13 Mar 2024 07:53:30 GMT, Christoph Langer <clanger at openjdk.org> wrote:
> 4f336085d1098e7fba7b58f0a73c028179a2a13d ([JDK-8326718](https://bugs.openjdk.org/browse/JDK-8326718)) added a few cases to test java/util/Formatter/Padding.java with huge Strings as arguments. Since all possible argument combinations for the test are stored in one array, nothing can be garbage collected while the test is running and the heap requirement is blown up.
>
> In one of our test pipelines we run tier1 tests with VMs that default to 384M of heap and this is not sufficient any longer.
>
> I'm improving this by splitting the one large @ParameterizedTest into multiple ones. With that, I could run the test successfully in a test VM with 96M of heap, e.g. by modifying `@run junit Padding` to `@run junit/othervm -Xmx96m Padding`
L.26-27 to
* @bug 4906370 8299677 8326718 8328037
* @summary Tests to exercise padding on int and double values,
test/jdk/java/util/Formatter/Padding.java line 43:
> 41: public class Padding {
> 42:
> 43: private static final String tenMillionZeros() {
Suggestion:
private static String tenMillionZeros() {
test/jdk/java/util/Formatter/Padding.java line 46:
> 44: return "0".repeat(10_000_000);
> 45: }
> 46: private static final String tenMillionBlanks() {
Suggestion:
private static String tenMillionBlanks() {
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18264#issuecomment-1994382507
PR Review Comment: https://git.openjdk.org/jdk/pull/18264#discussion_r1523241759
PR Review Comment: https://git.openjdk.org/jdk/pull/18264#discussion_r1523241920
More information about the i18n-dev
mailing list