From 54c905f87f1936f6ef1292b5187d07aa210ebf78 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Tue, 12 Jan 2016 21:07:50 -0800 Subject: [PATCH] testutil: fix data race in RecorderBuffered Was accessing a shared data structure instead of the private copy. Fixes #4198 --- pkg/testutil/recorder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/testutil/recorder.go b/pkg/testutil/recorder.go index 04b5357f285..db114d7bb9c 100644 --- a/pkg/testutil/recorder.go +++ b/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 }