]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test(crdb) Skip tests affected by BEGIN READ ONLY bug
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 29 Aug 2022 00:43:50 +0000 (01:43 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 29 Aug 2022 08:19:57 +0000 (09:19 +0100)
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
tests/test_connection.py

index b90c642293311878cab1f2a60034f00c8c3f1775..88ab50419ea1b020381faed546488693e1f1a9d3 100644 (file)
@@ -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,
index 59c044694378361c2fa8ec75a5843b9282b5f76f..57c6c788fe12db5afc1a7c20c88731548a0a84a5 100644 (file)
@@ -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")
+    ),
 ]