Skip isolation level test for CockroachDB

pull/955/head
Jack Christensen 2021-02-13 13:18:40 -06:00
parent 2f95f67ef5
commit 2e50e59491
1 changed files with 4 additions and 0 deletions

View File

@ -263,6 +263,10 @@ func TestBeginIsoLevels(t *testing.T) {
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
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}
for _, iso := range isoLevels {
tx, err := conn.BeginTx(context.Background(), pgx.TxOptions{IsoLevel: iso})