From 2e50e5949135883da1a82dee50df7c0ac7f06399 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 13 Feb 2021 13:18:40 -0600 Subject: [PATCH] Skip isolation level test for CockroachDB --- tx_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tx_test.go b/tx_test.go index 265131f9..6a5e2d3f 100644 --- a/tx_test.go +++ b/tx_test.go @@ -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})