Skip to content

Commit 91e22ef

Browse files
committed
[DOP-30862] Replace pytest.mark.xfail with conditional skip
1 parent 0389c91 commit 91e22ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/tests_integration/tests_db_connection_integration/test_postgres_integration.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,6 @@ def proc_finalizer():
570570
assert not postgres.execute(f"DROP TABLE {table}")
571571

572572

573-
@pytest.mark.xfail(reason="Postgres prior to v11 does not support procedures")
574573
@pytest.mark.parametrize("suffix", ["", ";"])
575574
def test_postgres_connection_execute_procedure_dml(
576575
request,
@@ -587,6 +586,10 @@ def test_postgres_connection_execute_procedure_dml(
587586
database=processing.database,
588587
spark=spark,
589588
)
589+
df = postgres.fetch("SHOW server_version")
590+
version = df.collect()[0][0]
591+
if not Version(version).major < 11:
592+
pytest.skip("Postgres prior to v11 does not support procedures")
590593

591594
table = get_schema_table.full_name
592595
proc = f"{table}_dml"

0 commit comments

Comments
 (0)