From 9632a6f001a21b26b411418d0f7125df64ac6318 Mon Sep 17 00:00:00 2001 From: Shubham Dhal Date: Sat, 2 May 2026 17:53:23 +0530 Subject: [PATCH] test: gate TestStreamingTableLiquidClusteringChanges via @skip_profile alone The class-level @skip_profile marker is enforced by a function-scope autouse fixture in tests/conftest.py, so any class-scope autouse setup runs before the skip can fire. On Assigned / No-isolation clusters, the dbt run in the old setup fixture errored with REQUIRES_SHARED_COMPUTE before the skip took effect, turning the marker into a flake (whether it skipped or errored depended on the active cluster type). Match the sibling TestStreamingTableLiquidClustering pattern: drop the class-scope autouse setup and inline `seed` + initial `--full-refresh` into the only test method. The function-scope skip then fires correctly. --- .../adapter/streaming_tables/test_st_basic.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/functional/adapter/streaming_tables/test_st_basic.py b/tests/functional/adapter/streaming_tables/test_st_basic.py index ee2aa1d94..31a80f862 100644 --- a/tests/functional/adapter/streaming_tables/test_st_basic.py +++ b/tests/functional/adapter/streaming_tables/test_st_basic.py @@ -331,17 +331,10 @@ def liquid_clustered_st(self, project) -> BaseRelation: type=DatabricksRelationType.StreamingTable, ) - @pytest.fixture(scope="class", autouse=True) - def setup(self, project, liquid_clustered_st): - util.run_dbt(["seed"]) - util.run_dbt(["run", "--models", liquid_clustered_st.identifier, "--full-refresh"]) - - yield - - project.run_sql(f"drop schema if exists {project.test_schema} cascade") - def test_liquid_clustering_change_is_applied(self, project, liquid_clustered_st): """Changing liquid_clustered_by on an existing ST should apply via ALTER.""" + util.run_dbt(["seed"]) + util.run_dbt(["run", "--models", liquid_clustered_st.identifier, "--full-refresh"]) util.write_file(fixtures.liquid_clustered_st_schema_v2, "models", "schema.yml") util.run_dbt(["run", "--models", liquid_clustered_st.identifier])