diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-10-14 19:29:55 +0300 |
---|---|---|
committer | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-10-14 19:29:55 +0300 |
commit | 0b8fdf7c2bac0e6d4438ae0314cb1772ae40af48 (patch) | |
tree | ecbd484bdbc3977e6271d27ed44323fe164b6cb3 | |
parent | 6cba2f2875856a7b4e2d008ca348d7b91098ed35 (diff) | |
parent | 8bca101e55dba1c73255f844a56e473ca6324baa (diff) |
Merge branch 'fix-flaky-cache-evict' into 'master'
Add a sleep to ensure that cache item is evicted for tests
Closes #483
See merge request gitlab-org/gitlab-pages!376
-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) |