Skip to content

Commit a71bb24

Browse files
authored
fix/hack for windows delete in tests (RoaringBitmap#781)
1 parent 02ba154 commit a71bb24

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

roaringbitmap/src/test/java/org/roaringbitmap/buffer/TestSerializationViaByteBuffer.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,14 @@ public void before(@TempDir Path tempDir) throws IOException {
109109
}
110110

111111
@AfterEach
112-
public void after() throws IOException {
112+
public void after() throws Exception {
113113
if (null != file) {
114-
if (!System.getProperty("os.name").toLowerCase().contains("windows")) {
115-
// nothing really works properly on Windows
114+
try {
115+
delete(file);
116+
} catch (Exception e) {
117+
System.gc();
118+
System.runFinalization();
119+
Thread.sleep(1);
116120
delete(file);
117121
}
118122
}

0 commit comments

Comments
 (0)