From 8a9ed579518d44b92579959cadc28e220c23a1cf Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 16 Feb 2018 12:05:59 +0000 Subject: [PATCH] vfs: fix another race in cache tests --- vfs/cache_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vfs/cache_test.go b/vfs/cache_test.go index bda264ab4..5b8fd1f0f 100644 --- a/vfs/cache_test.go +++ b/vfs/cache_test.go @@ -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")