harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r695525 - /harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
Date Mon, 15 Sep 2008 16:12:05 GMT
Author: tellison
Date: Mon Sep 15 09:12:04 2008
New Revision: 695525

URL: http://svn.apache.org/viewvc?rev=695525&view=rev
Log:
Ensure temporary files are deleted after running tests.
Please take your litter home with you.

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java?rev=695525&r1=695524&r2=695525&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
Mon Sep 15 09:12:04 2008
@@ -59,6 +59,7 @@
             int val = ibuffer.get();
             assertEquals("Got wrong int value", i + 1, val); //$NON-NLS-1$
         }
+        fc.close();
     }
     
     /**
@@ -99,6 +100,11 @@
 
         // Invoking force() will change the buffer
         assertFalse(mmbReadWrite.equals(resultReadWrite));
+        
+        fileChannelRead.close();
+        fileChannelR.close();
+        fileChannelReadWrite.close();
+        fileChannelRW.close();
     }
 
     /**
@@ -118,6 +124,9 @@
                 FileChannel.MapMode.READ_WRITE, 0, fileChannelReadWrite.size());
 
         assertEquals(mmbReadWrite, mmbReadWrite.load());
+        
+        fileChannelRead.close();
+        fileChannelReadWrite.close();
     }
 
     protected void setUp() throws IOException {



Mime
View raw message