From ea4be5cecbe0a3855e8cc068b5be2d4a3c0296a7 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 1 Oct 2019 18:11:44 +1000 Subject: [PATCH] mse: Fix race in BenchmarkStreamRC4 --- mse/mse_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/mse/mse_test.go b/mse/mse_test.go index 3efaf98d..5eeb73af 100644 --- a/mse/mse_test.go +++ b/mse/mse_test.go @@ -190,6 +190,7 @@ func benchmarkStream(t *testing.B, crypto CryptoMethod) { require.NoError(t, err) require.NoError(t, readAndWrite(rw, br, b)) }() + wg.Wait() t.StopTimer() if !bytes.Equal(ar, b) { t.Fatalf("A read the wrong bytes")