changeset 39650:d35ef7964b1e

8161426: Test java/util/zip/InflaterInputStream/TestAvailable.java fails on open-only linux Reviewed-by: bpb
author sherman
date Thu, 14 Jul 2016 16:04:38 -0700
parents aa000751d3d9
children 409deb371234
files jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java	Thu Jul 14 16:21:45 2016 +0000
+++ b/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java	Thu Jul 14 16:04:38 2016 -0700
@@ -25,7 +25,7 @@
  * @library /lib/testlibrary/
  * @build jdk.testlibrary.*
  * @run main TestAvailable
- * @bug 7031075
+ * @bug 7031075 8161426
  * @summary Make sure that available() method behaves as expected.
  * @key randomness
  */
@@ -40,9 +40,8 @@
     public static void main(String args[]) throws Throwable {
         Random r = RandomFactory.getRandom();
         for (int n = 0; n < 10; n++) {
-            byte[] src = new byte[r.nextInt(100)];
+            byte[] src = new byte[r.nextInt(100) + 1];
             r.nextBytes(src);
-
             // test InflaterInputStream
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             try (DeflaterOutputStream dos = new DeflaterOutputStream(baos)) {