This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 26d7770a Try to better clean up test fixtures.
26d7770a is described below

commit 26d7770afd1e54048276f56a08e68d2237734de8
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Wed Jun 15 07:19:04 2022 -0400

    Try to better clean up test fixtures.
---
 .../apache/commons/io/input/MemoryMappedFileInputStreamTest.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/src/test/java/org/apache/commons/io/input/MemoryMappedFileInputStreamTest.java
 
b/src/test/java/org/apache/commons/io/input/MemoryMappedFileInputStreamTest.java
index 338fefbb..4f6ebf86 100644
--- 
a/src/test/java/org/apache/commons/io/input/MemoryMappedFileInputStreamTest.java
+++ 
b/src/test/java/org/apache/commons/io/input/MemoryMappedFileInputStreamTest.java
@@ -50,6 +50,13 @@ public class MemoryMappedFileInputStreamTest {
         // otherwise the temporary files won't be able to be removed when 
running on
         // Windows. Calling gc() is just a hint to the VM.
         System.gc();
+        Thread.yield();
+        System.runFinalization();
+        Thread.yield();
+        System.gc();
+        Thread.yield();
+        System.runFinalization();
+        Thread.yield();
     }
 
     private Path createTestFile(final int size) throws IOException {

Reply via email to