mirror of
https://github.com/zhigang1992/AndroidVideoCache.git
synced 2026-03-06 22:32:57 +08:00
fix tests
This commit is contained in:
@@ -172,12 +172,14 @@ public class FileCacheTest extends BaseTest {
|
||||
assertThat(deletedFile).doesNotExist();
|
||||
}
|
||||
|
||||
private void saveAndCompleteCache(DiskUsage diskUsage, byte[] data, File... files) throws ProxyCacheException, IOException {
|
||||
private void saveAndCompleteCache(DiskUsage diskUsage, byte[] data, File... files) throws ProxyCacheException, IOException, InterruptedException {
|
||||
for (File file : files) {
|
||||
FileCache fileCache = new FileCache(file, diskUsage);
|
||||
fileCache.append(data, data.length);
|
||||
fileCache.complete();
|
||||
assertThat(file).exists();
|
||||
fileCache.close();
|
||||
Thread.sleep(1000); // last modified date wrote in seconds.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user