You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2008/09/15 18:12:05 UTC
svn commit: r695525 -
/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
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 {