From cfcfd5d8faa22e1f6d38a22b7874b5aeb3dfe7db Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Tue, 5 Jan 2021 20:33:13 +0100 Subject: [PATCH] Fix race in blockstore test suite Signed-off-by: Jakub Sztandera --- lib/blockstore/badger/blockstore_test_suite.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/blockstore/badger/blockstore_test_suite.go b/lib/blockstore/badger/blockstore_test_suite.go index b11fc4e23..9332e62c5 100644 --- a/lib/blockstore/badger/blockstore_test_suite.go +++ b/lib/blockstore/badger/blockstore_test_suite.go @@ -183,6 +183,8 @@ func (s *Suite) TestAllKeysRespectsContext(t *testing.T) { require.True(t, ok) cancel() + // pull one value out to avoid race + _, _ = <-ch v, ok = <-ch require.Equal(t, cid.Undef, v)