JDK-6475005 : Various regression tests are not cleaning up on exit
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-09-26
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b03Fixed
Related Reports
Relates :  
Relates :  
Description
There are a number of regression tests which are not properly cleaning up after themselves on exit.

Some of the regression tests are using File.createTempFile() without cleaning up the dead files.  As a result, I had almost *36 GB* of dead space on sheen.  Obviously, that's a problem.  Builds were crawling or dying, spurious failures...etc...

The easiest way to avoid this is to use the following pattern:

    File f = File.createTemptFile(...);
    f.deleteOnExit();

rather than trying to catch your errors in case of failure.  In some cases, there was no attempt at cleanup at all, success or failure.

Please clean these up ASAP.  The changes are very easy.

Network files

./com/sun/net/httpserver/SelCacheTest.java
./com/sun/net/httpserver/Test1.java
./com/sun/net/httpserver/Test12.java
./com/sun/net/httpserver/Test13.java
./com/sun/net/httpserver/Test9.java
./com/sun/net/httpserver/Test9a.java
./java/net/URLConnection/UnknownContentType.java
./sun/net/www/protocol/file/FileMap.java
./sun/net/www/protocol/file/GetLastModified.java
./sun/net/www/protocol/jar/jarbug/src/test/JarTest.java


General TL files

./java/io/File/GetXSpace.java
./java/io/File/NullArgs.java
./java/io/File/createTempFile/Security.java
./java/io/FileInputStream/LeadingSlash.java
./java/nio/channels/Channels/Basic.java
./java/nio/channels/FileChannel/Lock.java   (should be tagged after creation)
./java/nio/channels/FileChannel/Size.java
./java/nio/channels/FileChannel/Truncate.java
./java/util/TimeZone/Bug4472183.java
./java/util/zip/ZipFile/ManyZipFiles.java  (should be tagged after creation)
./sun/misc/URLClassPath/FileLoaderTest.java


Others (file a new bug if desired):

./java/awt/font/FontsAndFiles/ManyFilesandFonts.java
./javax/imageio/AllowSearch.java
./javax/imageio/ImageIOWriteFile.java
./javax/imageio/ImageWriteParamTest.java
./javax/imageio/SetOutput.java
./javax/imageio/plugins/bmp/NoExtraBytesTest.java
./javax/imageio/plugins/bmp/TestCompressionBI_BITFIELDS.java
./javax/imageio/plugins/gif/RGBAnimationTest.java
./javax/imageio/plugins/png/WriteProgressive.java

Comments
EVALUATION The following tests have been updated as described in the description section: test/com/sun/net/httpserver/SelCacheTest.java test/com/sun/net/httpserver/Test1.java test/com/sun/net/httpserver/Test12.java test/com/sun/net/httpserver/Test13.java test/com/sun/net/httpserver/Test9.java test/com/sun/net/httpserver/Test9a.java test/java/net/URLConnection/UnknownContentType.java test/sun/net/www/protocol/file/FileMap.java test/sun/net/www/protocol/file/GetLastModified.java test/java/nio/channels/FileChannel/Lock.java test/java/nio/channels/FileChannel/Size.java test/java/nio/channels/FileChannel/Truncate.java test/java/util/zip/ZipFile/ManyZipFiles.java test/sun/misc/URLClassPath/FileLoaderTest.java This will greatly reduce the amount of disk space consumed by these tests if they encounter an erroneous suitation.
03-10-2006

EVALUATION see comments:
28-09-2006