Skip to content

Commit 842f6a7

Browse files
committed
refactor
1 parent 747435d commit 842f6a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/integration/fixtures/test_connect.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,7 @@ def is_serverless_cluster(spark: SparkSession, ws: WorkspaceClient) -> bool:
5656
Check if the current cluster used is serverless.
5757
"""
5858
cluster_id = spark.conf.get("spark.databricks.clusterUsageTags.clusterId")
59+
if not cluster_id:
60+
raise ValueError("clusterId usage tag does not exist")
5961
creator = ws.clusters.get(cluster_id).creator_user_name
6062
return not creator # serverless clusters don't have assigned creator

0 commit comments

Comments
 (0)