testutil: fix data race in RecorderBuffered

Was accessing a shared data structure instead of the private copy.

Fixes #4198
This commit is contained in:
Anthony Romano 2016-01-12 21:07:50 -08:00
parent efa9cd7e0c
commit 54c905f87f

View File

@ -61,7 +61,7 @@ func (r *RecorderBuffered) Wait(n int) (acts []Action, err error) {
WaitSchedule()
acts = r.Action()
if len(acts) < n {
err = newLenErr(n, len(r.actions))
err = newLenErr(n, len(acts))
}
return acts, err
}