Skip to content

Commit

Permalink
run tests that rely on backend PID to run against cockroach
Browse files Browse the repository at this point in the history
cockroach has supported backend PIDs on connections since 22.1:
https://www.cockroachlabs.com/docs/releases/v22.1.html#v22-1-3-sql-language-changes
  • Loading branch information
ecordell authored and jackc committed May 15, 2023
1 parent 7f2bb95 commit cead918
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions pgxpool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,6 @@ func TestPoolAfterRelease(t *testing.T) {
pool, err := pgxpool.New(context.Background(), os.Getenv("PGX_TEST_DATABASE"))
require.NoError(t, err)
defer pool.Close()

err = pool.AcquireFunc(context.Background(), func(conn *pgxpool.Conn) error {
if conn.Conn().PgConn().ParameterStatus("crdb_version") != "" {
t.Skip("Server does not support backend PID")
}
return nil
})
require.NoError(t, err)
}()

config, err := pgxpool.ParseConfig(os.Getenv("PGX_TEST_DATABASE"))
Expand Down Expand Up @@ -354,14 +346,6 @@ func TestPoolBeforeClose(t *testing.T) {
pool, err := pgxpool.New(context.Background(), os.Getenv("PGX_TEST_DATABASE"))
require.NoError(t, err)
defer pool.Close()

err = pool.AcquireFunc(context.Background(), func(conn *pgxpool.Conn) error {
if conn.Conn().PgConn().ParameterStatus("crdb_version") != "" {
t.Skip("Server does not support backend PID")
}
return nil
})
require.NoError(t, err)
}()

config, err := pgxpool.ParseConfig(os.Getenv("PGX_TEST_DATABASE"))
Expand Down Expand Up @@ -719,14 +703,6 @@ func TestConnReleaseClosesConnInFailedTransaction(t *testing.T) {
require.NoError(t, err)
defer pool.Close()

err = pool.AcquireFunc(ctx, func(conn *pgxpool.Conn) error {
if conn.Conn().PgConn().ParameterStatus("crdb_version") != "" {
t.Skip("Server does not support backend PID")
}
return nil
})
require.NoError(t, err)

c, err := pool.Acquire(ctx)
require.NoError(t, err)

Expand Down Expand Up @@ -765,14 +741,6 @@ func TestConnReleaseClosesConnInTransaction(t *testing.T) {
require.NoError(t, err)
defer pool.Close()

err = pool.AcquireFunc(ctx, func(conn *pgxpool.Conn) error {
if conn.Conn().PgConn().ParameterStatus("crdb_version") != "" {
t.Skip("Server does not support backend PID")
}
return nil
})
require.NoError(t, err)

c, err := pool.Acquire(ctx)
require.NoError(t, err)

Expand Down

0 comments on commit cead918

Please sign in to comment.