From 737ae7742a028bc81ce6916ecb895e88cc7f3f38 Mon Sep 17 00:00:00 2001 From: Fernando Guallini Date: Tue, 1 Sep 2020 19:04:42 +0100 Subject: [PATCH] 8249699: java/io/ByteArrayOutputStream/MaxCapacity.java should use @requires instead of @ignore Use @requires os.maxMemory in order to run the test only if memory requirements are satisfied as opposed to ignoring it Reviewed-by: coffeys --- test/jdk/java/io/ByteArrayOutputStream/MaxCapacity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/jdk/java/io/ByteArrayOutputStream/MaxCapacity.java b/test/jdk/java/io/ByteArrayOutputStream/MaxCapacity.java index e46786cca27..f159087e464 100644 --- a/test/jdk/java/io/ByteArrayOutputStream/MaxCapacity.java +++ b/test/jdk/java/io/ByteArrayOutputStream/MaxCapacity.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2014 Google Inc. All rights reserved. + * Copyright (c) 2014, Google Inc. All rights reserved. + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,11 +24,11 @@ /* * @test - * @ignore This test has huge memory requirements - * @run main/timeout=1800/othervm -Xmx8g MaxCapacity * @bug 8055949 * @summary Check that we can write (almost) Integer.MAX_VALUE bytes * to a ByteArrayOutputStream. + * @requires (sun.arch.data.model == "64" & os.maxMemory >= 10g) + * @run main/timeout=1800/othervm -Xmx8g MaxCapacity * @author Martin Buchholz */ import java.io.ByteArrayOutputStream;