mse: Fix race in BenchmarkStreamRC4

This commit is contained in:
Matt Joiner 2019-10-01 18:11:44 +10:00
parent ca20deeff6
commit ea4be5cecb
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ func benchmarkStream(t *testing.B, crypto CryptoMethod) {
require.NoError(t, err) require.NoError(t, err)
require.NoError(t, readAndWrite(rw, br, b)) require.NoError(t, readAndWrite(rw, br, b))
}() }()
wg.Wait()
t.StopTimer() t.StopTimer()
if !bytes.Equal(ar, b) { if !bytes.Equal(ar, b) {
t.Fatalf("A read the wrong bytes") t.Fatalf("A read the wrong bytes")