From abaaa35bf31bdc666c7758bb71e680259b2ae392 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 29 Aug 2022 01:43:50 +0100 Subject: [PATCH] test(crdb) Skip tests affected by BEGIN READ ONLY bug The connection doesn't go in read-only mode if the statement is executed using the advanced protocol. See https://github.com/cockroachdb/cockroach/issues/87012 --- tests/fix_crdb.py | 1 + tests/test_connection.py | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/fix_crdb.py b/tests/fix_crdb.py index b90c64229..88ab50419 100644 --- a/tests/fix_crdb.py +++ b/tests/fix_crdb.py @@ -90,6 +90,7 @@ _crdb_reasons = { "2-phase commit": 22329, "backend pid": 35897, "batch statements": 44803, + "begin_read_only": 87012, "binary decimal": 82492, "cancel": 41335, "cast adds tz": 51692, diff --git a/tests/test_connection.py b/tests/test_connection.py index 59c044694..57c6c788f 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -616,10 +616,15 @@ tx_params = [ tx_params_isolation = [ pytest.param( param_isolation, + id="isolation_level", marks=pytest.mark.crdb("skip", reason="transaction isolation"), ), - param_read_only, - pytest.param(param_deferrable, marks=pytest.mark.crdb_skip("deferrable")), + pytest.param( + param_read_only, id="read_only", marks=pytest.mark.crdb_skip("begin_read_only") + ), + pytest.param( + param_deferrable, id="deferrable", marks=pytest.mark.crdb_skip("deferrable") + ), ] -- 2.47.2