From: Daniele Varrazzo Date: Mon, 29 Aug 2022 00:43:50 +0000 (+0100) Subject: test(crdb) Skip tests affected by BEGIN READ ONLY bug X-Git-Tag: 3.1~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abaaa35bf31bdc666c7758bb71e680259b2ae392;p=thirdparty%2Fpsycopg.git 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 --- 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") + ), ]