6541631: (fc) java/nio/channels/Filechannel/LongTransferTest.java should clean up after itself
authorsherman
Fri, 27 Jun 2008 12:09:37 -0700
changeset 789 218b7e32fe38
parent 788 543f9917b10a
child 795 b4e3c4974723
child 796 2c3db720c065
child 841 3234b58ccc92
6541631: (fc) java/nio/channels/Filechannel/LongTransferTest.java should clean up after itself Summary: Should close the channel before delete the file Reviewed-by: alanb
jdk/test/java/nio/channels/FileChannel/LongTransferTest.java
--- a/jdk/test/java/nio/channels/FileChannel/LongTransferTest.java	Fri Jun 27 09:05:11 2008 -0700
+++ b/jdk/test/java/nio/channels/FileChannel/LongTransferTest.java	Fri Jun 27 12:09:37 2008 -0700
@@ -22,7 +22,7 @@
  */
 
 /* @test
-   @bug 5105464 6269047
+   @bug 5105464 6269047 6541631
  * @summary Test to transfer bytes with a size bigger than Integer.MAX_VALUE
  */
 
@@ -81,8 +81,10 @@
         System.out.println("LongTransferTest-main: OK!");
 
         socket.close();
+        server.close();
 
-        server.close();
+        inChannel.close();
+        outChannel.close();
 
         inFile.delete();
         outFile.delete();