diff --git a/mvcc/kv_test.go b/mvcc/kv_test.go index 1641afb5032..0d93b394b89 100644 --- a/mvcc/kv_test.go +++ b/mvcc/kv_test.go @@ -410,10 +410,11 @@ func TestKVTxnBlockWriteOperations(t *testing.T) { func() { s.DeleteRange([]byte("foo"), nil) }, } for i, tt := range tests { + tf := tt txn := s.Write(traceutil.TODO()) done := make(chan struct{}, 1) go func() { - tt() + tf() done <- struct{}{} }() select {