Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2020-10-14 12:08:18 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2020-10-14 12:08:18 +0300
commit8bca101e55dba1c73255f844a56e473ca6324baa (patch)
treeecbd484bdbc3977e6271d27ed44323fe164b6cb3 /internal/vfs
parent6cba2f2875856a7b4e2d008ca348d7b91098ed35 (diff)
Add a sleep to ensure that cache item is evictedfix-flaky-cache-evict
Diffstat (limited to 'internal/vfs')
-rw-r--r--internal/vfs/zip/vfs_test.go1
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)