Skip to content

Commit

Permalink
[VFS-856] fix JunctionTests (#663)
Browse files Browse the repository at this point in the history
The test would leave a file behind, causing it to fail
the next time it runs (e.g. impacting 'mvn install')
  • Loading branch information
raboof authored Feb 14, 2025
1 parent 05f6b35 commit 6837fa8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ public void testEvent() throws Exception {

final FileObject real2 = baseDir.resolveFile("weakref.txt");
real2.createFile();
assertEquals("Weak Listener was abandoned", "Listener false true false", listener2.toString());
try {
assertEquals("Weak Listener was abandoned", "Listener false true false", listener2.toString());
} finally {
assertTrue("Don't contaminate the fs for the next time the test runs", file2.delete());
}
}

/**
Expand Down

0 comments on commit 6837fa8

Please sign in to comment.