Skip to content

Commit 36fea1c

Browse files
committed
fix tests
1 parent acdf747 commit 36fea1c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/src/test/java/com/danikula/videocache/file/FileCacheTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,14 @@ public void testTrimAfterCompletionForTotalSizeLru() throws Exception {
172172
assertThat(deletedFile).doesNotExist();
173173
}
174174

175-
private void saveAndCompleteCache(DiskUsage diskUsage, byte[] data, File... files) throws ProxyCacheException, IOException {
175+
private void saveAndCompleteCache(DiskUsage diskUsage, byte[] data, File... files) throws ProxyCacheException, IOException, InterruptedException {
176176
for (File file : files) {
177177
FileCache fileCache = new FileCache(file, diskUsage);
178178
fileCache.append(data, data.length);
179179
fileCache.complete();
180180
assertThat(file).exists();
181+
fileCache.close();
182+
Thread.sleep(1000); // last modified date wrote in seconds.
181183
}
182184
}
183185

0 commit comments

Comments
 (0)