Skip to content

Commit

Permalink
Improve cache before and after steps for flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdrwenski committed Jan 31, 2024
1 parent 2322c54 commit 9ad6aef
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ public class TestRandomAccessFileCacheCleanup {

@BeforeClass
public static void enableCache() {
RandomAccessFile.shutdown();
cache = new FileCache("RandomAccessFile", 0, 1, 1, 0);
RandomAccessFile.setGlobalFileCache(cache);
assertThat(cache.showCache().size()).isEqualTo(0);
}

@AfterClass
public static void shutdownCache() {
RandomAccessFile.shutdown();
RandomAccessFile.setGlobalFileCache(null);
}

Expand Down

0 comments on commit 9ad6aef

Please sign in to comment.