[8u] RFR: 8213561: ZipFile/MultiThreadedReadTest.java timed out in tier1
Severin Gehwolf
sgehwolf at redhat.com
Mon Jul 29 13:49:12 UTC 2019
Hi,
Please review this test stability improvement for JDK 8u. It brings the
test in-line with jdk/jdk and, once approved, JDK 11u. The JDK 11 patch
didn't apply cleanly. Only differences are:
* copyright header => omitted
* import statements => fixed manually
* no @key randomness in JDK 8u => dropped in JDK 8 patch
* String.repeat() => changed as follows
diff --git a/test/java/util/zip/ZipFile/MultiThreadedReadTest.java b/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
--- a/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
+++ b/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
@@ -80,7 +80,11 @@
ZipOutputStream zos = new ZipOutputStream(bos)) {
ZipEntry e = new ZipEntry(ZIPENTRY_NAME);
e.setMethod(ZipEntry.STORED);
- byte[] toWrite = "BLAH".repeat(10_000).getBytes();
+ StringBuilder blahBuilder = new StringBuilder();
+ for (int i = 0; i < 10_000; i++) {
+ blahBuilder.append("BLAH");
+ }
+ byte[] toWrite = blahBuilder.toString().getBytes();
Bug: https://bugs.openjdk.java.net/browse/JDK-8213561
webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8213561/jdk8/01/webrev/
original-changeset: http://hg.openjdk.java.net/jdk/jdk/rev/12e8433e2581
Thoughts?
Thanks,
Severin
More information about the jdk8u-dev
mailing list