Skip to content

Commit 26d7770

Browse files
author
Gary Gregory
committed
Try to better clean up test fixtures.
1 parent 6efad79 commit 26d7770

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/test/java/org/apache/commons/io/input/MemoryMappedFileInputStreamTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ void afterEach() {
5050
// otherwise the temporary files won't be able to be removed when running on
5151
// Windows. Calling gc() is just a hint to the VM.
5252
System.gc();
53+
Thread.yield();
54+
System.runFinalization();
55+
Thread.yield();
56+
System.gc();
57+
Thread.yield();
58+
System.runFinalization();
59+
Thread.yield();
5360
}
5461

5562
private Path createTestFile(final int size) throws IOException {

0 commit comments

Comments
 (0)