vfs: fix another race in cache tests

This commit is contained in:
Nick Craig-Wood 2018-02-16 12:05:59 +00:00
parent a5c3bcc9c7
commit 8a9ed57951

View file

@ -63,9 +63,9 @@ func TestCacheNew(t *testing.T) {
defer r.Finalise()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
c, err := newCache(ctx, r.Fremote, &DefaultOpt)
cancel() // kill the background cache cleaning as it interferes with the tests
require.NoError(t, err)
assert.Contains(t, c.root, "vfs")