run tests that rely on backend PID to run against cockroach

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
pull/1606/head
Evan Cordell 2023-05-01 15:19:28 -04:00 committed by Jack Christensen
parent 7f2bb9595f
commit cead918e18
1 changed files with 0 additions and 32 deletions

View File

@ -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"))
@ -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"))
@ -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)
@ -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)