changeset 9043:2d01f25b1b37

8030089: java/util/zip/ZipFile/FinalizeZipFile.java intermittently fails with fastdebug builds Reviewed-by: alanb Contributed-by: tristan.yan@oracle.com
author alanb
date Wed, 08 Jan 2014 12:59:57 +0000
parents 9d29ba8fd305
children 1e0ed6b05df7
files test/java/util/zip/ZipFile/FinalizeZipFile.java
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/util/zip/ZipFile/FinalizeZipFile.java	Tue Jan 07 19:19:32 2014 -0800
+++ b/test/java/util/zip/ZipFile/FinalizeZipFile.java	Wed Jan 08 12:59:57 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -27,11 +27,9 @@
  */
 
 import java.io.*;
-import java.nio.*;
 import java.util.Random;
 import java.util.zip.*;
 import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
 
 public class FinalizeZipFile {
 
@@ -43,6 +41,7 @@
             super(f);
             System.out.printf("Using %s%n", f.getPath());
         }
+        @Override
         protected void finalize() throws IOException {
             System.out.printf("Killing %s%n", getName());
             super.finalize();
@@ -81,7 +80,7 @@
         makeGarbage();
 
         System.gc();
-        finalizersDone.await(5, TimeUnit.SECONDS);
+        finalizersDone.await();
 
         // Not all ZipFiles were collected?
         equal(finalizersDone.getCount(), 0L);