Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8249699: java/io/ByteArrayOutputStream/MaxCapacity.java should use @r…
…equires instead of @ignore

Use @requires os.maxMemory in order to run the test only if memory requirements are satisfied as opposed to ignoring it

Backport-of: 737ae77
  • Loading branch information
GoeLin committed Jun 23, 2023
1 parent 77837e3 commit 817254d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions 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
Expand All @@ -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;
Expand Down

1 comment on commit 817254d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.