diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2020-10-14 12:08:18 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2020-10-14 12:08:18 +0300 |
commit | 8bca101e55dba1c73255f844a56e473ca6324baa (patch) | |
tree | ecbd484bdbc3977e6271d27ed44323fe164b6cb3 | |
parent | 6cba2f2875856a7b4e2d008ca348d7b91098ed35 (diff) |
Add a sleep to ensure that cache item is evictedfix-flaky-cache-evict
-rw-r--r-- | internal/vfs/zip/vfs_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/vfs/zip/vfs_test.go b/internal/vfs/zip/vfs_test.go index a795b214..c12e49cd 100644 --- a/internal/vfs/zip/vfs_test.go +++ b/internal/vfs/zip/vfs_test.go @@ -118,6 +118,7 @@ func TestVFSFindOrCreateArchiveCacheEvict(t *testing.T) { // inject into cache to be "expired" // (we could as well wait `defaultCacheExpirationInterval`) vfs.cache.Set(path, archive, time.Nanosecond) + time.Sleep(time.Nanosecond) // a new object is created archive2, err := vfs.findOrOpenArchive(context.Background(), path) |