From ff43bd83208ad6a3aa5728c580b5a82ab9b5ce91 Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Fri, 3 Mar 2023 17:04:47 -0500 Subject: [PATCH] copy: fix data race in test The test code had two goroutines that were both trying to assign to the same `err` variable. Release note: None --- pkg/sql/copy/copy_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sql/copy/copy_test.go b/pkg/sql/copy/copy_test.go index 6df9e447977c..61c9218bb403 100644 --- a/pkg/sql/copy/copy_test.go +++ b/pkg/sql/copy/copy_test.go @@ -412,7 +412,7 @@ func TestShowQueriesIncludesCopy(t *testing.T) { t.Run("copy to", func(t *testing.T) { g := ctxgroup.WithContext(ctx) g.GoCtx(func(ctx context.Context) error { - _, err = copyConn.Exec(ctx, "COPY (SELECT pg_sleep(1) FROM ROWS FROM (generate_series(1, 60)) AS i) TO STDOUT") + _, err := copyConn.Exec(ctx, "COPY (SELECT pg_sleep(1) FROM ROWS FROM (generate_series(1, 60)) AS i) TO STDOUT") return err })