mirror of https://github.com/jackc/pgx.git
Skip isolation level test for CockroachDB
parent
2f95f67ef5
commit
2e50e59491
|
@ -263,6 +263,10 @@ func TestBeginIsoLevels(t *testing.T) {
|
||||||
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
||||||
defer closeConn(t, conn)
|
defer closeConn(t, conn)
|
||||||
|
|
||||||
|
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
||||||
|
t.Skip("Server always uses SERIALIZABLE isolation (https://www.cockroachlabs.com/docs/stable/demo-serializable.html)")
|
||||||
|
}
|
||||||
|
|
||||||
isoLevels := []pgx.TxIsoLevel{pgx.Serializable, pgx.RepeatableRead, pgx.ReadCommitted, pgx.ReadUncommitted}
|
isoLevels := []pgx.TxIsoLevel{pgx.Serializable, pgx.RepeatableRead, pgx.ReadCommitted, pgx.ReadUncommitted}
|
||||||
for _, iso := range isoLevels {
|
for _, iso := range isoLevels {
|
||||||
tx, err := conn.BeginTx(context.Background(), pgx.TxOptions{IsoLevel: iso})
|
tx, err := conn.BeginTx(context.Background(), pgx.TxOptions{IsoLevel: iso})
|
||||||
|
|
Loading…
Reference in New Issue