Explorar o código

Merge pull request #4199 from heyitsanthony/fix-recorder-datarace

testutil: fix data race in RecorderBuffered
Anthony Romano %!s(int64=10) %!d(string=hai) anos
pai
achega
b83c52888c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/testutil/recorder.go

+ 1 - 1
pkg/testutil/recorder.go

@@ -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
 }