Skip to content

Commit

Permalink
Merge #98006
Browse files Browse the repository at this point in the history
98006: copy: fix data race in test r=otan a=rafiss

The test code had two goroutines that were both trying to assign to the same `err` variable.

fixes #97838

Release note: None

Co-authored-by: Rafi Shamim <[email protected]>
  • Loading branch information
craig[bot] and rafiss committed Mar 6, 2023
2 parents c6996f0 + ff43bd8 commit 1d4feea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/copy/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})

Expand Down

0 comments on commit 1d4feea

Please sign in to comment.