From 85c40c3e25fd928897d5cfc4b253201bdc32d2ec Mon Sep 17 00:00:00 2001 From: davem-bis <68955845+davem-bis@users.noreply.github.com> Date: Wed, 2 Sep 2026 13:55:56 +0100 Subject: [PATCH 1/3] Apply the isolated marker to all tests that utilise capsys. Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com> --- tests/conftest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 4d1bb23577..3d1928fba2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -216,8 +216,12 @@ def pytest_collection_modifyitems(items, *args, **kwargs): if marker.name in test_type_markers: break else: - # if no test type marker is found, assume fast test - item.add_marker("fast") + # If no test type marker is found, assume it is a fast or isolated test. + if "capsys" in item.fixturenames: + # capsys is not threadsafe, so the test must be isolated. + item.add_marker("isolated") + else: + item.add_marker("fast") # Ignore all local config files From b8fd024dab92335f6471b36d66464b39e3610aaa Mon Sep 17 00:00:00 2001 From: davem-bis <68955845+davem-bis@users.noreply.github.com> Date: Mon, 7 Sep 2026 12:37:43 +0100 Subject: [PATCH 2/3] Modified conftest to ensure that the isolated is added to all tests utilising capsys, not just fast tests. Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com> --- Makefile | 6 +++--- tests/conftest.py | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b9da58757a..a78da2681a 100644 --- a/Makefile +++ b/Makefile @@ -132,13 +132,13 @@ engine-up: engine-clickhouse-up engine-mssql-up engine-mysql-up engine-postgres- engine-down: engine-clickhouse-down engine-mssql-down engine-mysql-down engine-postgres-down engine-spark-down engine-trino-down fast-test: - pytest -n auto -m "fast and not cicdonly" --junitxml=test-results/junit-fast-test.xml && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" + pytest -n auto -m "fast and not cicdonly and not isolated" --junitxml=test-results/junit-fast-test.xml && pytest -m "isolated and not slow" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" slow-test: - pytest -n auto -m "(fast or slow) and not cicdonly" && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" + pytest -n auto -m "(fast or slow) and not cicdonly and not isolated" && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" cicd-test: - pytest -n auto -m "(fast or slow) and not pyspark" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark" && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" + pytest -n auto -m "(fast or slow) and not pyspark and not isolated" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark" && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" core-fast-test: pytest -n auto -m "fast and not web and not github and not dbt and not jupyter" diff --git a/tests/conftest.py b/tests/conftest.py index 3d1928fba2..1f7f6d9325 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -212,16 +212,14 @@ def pytest_collection_modifyitems(items, *args, **kwargs): "dialect_isolated", } for item in items: + if "capsys" in item.fixturenames: + # capsys is not threadsafe, so the test must be isolated. + item.add_marker("isolated") for marker in item.iter_markers(): if marker.name in test_type_markers: break else: - # If no test type marker is found, assume it is a fast or isolated test. - if "capsys" in item.fixturenames: - # capsys is not threadsafe, so the test must be isolated. - item.add_marker("isolated") - else: - item.add_marker("fast") + item.add_marker("fast") # Ignore all local config files From 353672fd6d949917e8f894807eff77f5da62bb73 Mon Sep 17 00:00:00 2001 From: davem-bis <68955845+davem-bis@users.noreply.github.com> Date: Mon, 7 Sep 2026 13:11:17 +0100 Subject: [PATCH 3/3] Added in PySpark exclusion in cicd-test to prevent Pyspark and Isolated tests being executed multiple times. Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a78da2681a..cc167212c0 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ slow-test: pytest -n auto -m "(fast or slow) and not cicdonly and not isolated" && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" cicd-test: - pytest -n auto -m "(fast or slow) and not pyspark and not isolated" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark" && pytest -m "isolated" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" + pytest -n auto -m "(fast or slow) and not pyspark and not isolated" --junitxml=test-results/junit-cicd.xml && pytest -m "pyspark" && pytest -m "isolated and not pyspark" && pytest -m "registry_isolation" && pytest -m "dialect_isolated" core-fast-test: pytest -n auto -m "fast and not web and not github and not dbt and not jupyter"