mirror of https://github.com/jackc/pgx.git
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-changespull/1606/head
parent
7f2bb9595f
commit
cead918e18
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue