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