From 842f6a7ad575a163029cfc4f985082f98d95fce5 Mon Sep 17 00:00:00 2001 From: Marcin Wojtyczka Date: Fri, 31 Jan 2025 12:17:55 +0100 Subject: [PATCH] refactor --- tests/integration/fixtures/test_connect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/fixtures/test_connect.py b/tests/integration/fixtures/test_connect.py index 1084700..f0e501b 100644 --- a/tests/integration/fixtures/test_connect.py +++ b/tests/integration/fixtures/test_connect.py @@ -56,5 +56,7 @@ def is_serverless_cluster(spark: SparkSession, ws: WorkspaceClient) -> bool: Check if the current cluster used is serverless. """ cluster_id = spark.conf.get("spark.databricks.clusterUsageTags.clusterId") + if not cluster_id: + raise ValueError("clusterId usage tag does not exist") creator = ws.clusters.get(cluster_id).creator_user_name return not creator # serverless clusters don't have assigned creator