changeset 54316:f714e4cebceb

8221568: DataOutputStream/WriteUTF.java fails due to "OutOfMemoryError: Java heap space" Reviewed-by: shade
author bpb
date Wed, 27 Mar 2019 16:35:25 -0700
parents 7d5a4a48e876
children 5b5bd291ca32
files test/jdk/java/io/DataOutputStream/WriteUTF.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/io/DataOutputStream/WriteUTF.java	Wed Mar 27 14:40:36 2019 -0700
+++ b/test/jdk/java/io/DataOutputStream/WriteUTF.java	Wed Mar 27 16:35:25 2019 -0700
@@ -24,7 +24,8 @@
 /* @test
  * @bug 4260284 8219196
  * @summary Test if DataOutputStream will overcount written field.
- * @run testng/othervm -Xmx2g WriteUTF
+ * @requires (sun.arch.data.model == "64" & os.maxMemory >= 3g)
+ * @run testng/othervm -Xmx3g WriteUTF
  */
 
 import java.io.ByteArrayOutputStream;
@@ -59,7 +60,7 @@
     }
 
     // Without 8219196 fix, throws ArrayIndexOutOfBoundsException instead of
-    // expected UTFDataFormatException. Requires 2GB of heap (-Xmx2g) to run
+    // expected UTFDataFormatException. Requires 3GB of heap (-Xmx3g) to run
     // without throwing an OutOfMemoryError.
     @Test(expectedExceptions = UTFDataFormatException.class)
     public void arrayIndexOutOfBoundsException() throws IOException {