2
0

copy tests: test all supported modes

if we run the test in parallel, we always test the latest mode

see here

https://github.com/golang/go/wiki/LoopvarExperiment

also fix a lint warning about pgtype.Vec2
This commit is contained in:
Nicola Murino
2023-06-15 15:37:24 +02:00
committed by Jack Christensen
parent b1f8055584
commit eb2807bda5
2 changed files with 1 additions and 5 deletions
-4
View File
@@ -17,8 +17,6 @@ import (
func TestConnCopyWithAllQueryExecModes(t *testing.T) {
for _, mode := range pgxtest.AllQueryExecModes {
t.Run(mode.String(), func(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
@@ -81,8 +79,6 @@ func TestConnCopyWithKnownOIDQueryExecModes(t *testing.T) {
for _, mode := range pgxtest.KnownOIDQueryExecModes {
t.Run(mode.String(), func(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
+1 -1
View File
@@ -1784,7 +1784,7 @@ func TestConnSimpleProtocol(t *testing.T) {
{
if conn.PgConn().ParameterStatus("crdb_version") == "" {
// CockroachDB doesn't support circle type.
expected := pgtype.Circle{P: pgtype.Vec2{1, 2}, R: 1.5, Valid: true}
expected := pgtype.Circle{P: pgtype.Vec2{X: 1, Y: 2}, R: 1.5, Valid: true}
actual := expected
err := conn.QueryRow(
context.Background(),