Skip to content

Commit 1319c40

Browse files
committed
Modify hasattr logic, add logging info to debug
1 parent 2803a93 commit 1319c40

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/integration-tests/conftest.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ class SharedClusterDetectionTimeoutError(Exception):
373373
pass
374374

375375

376+
class SharedClusterDetectionTimeoutError(Exception):
377+
"""Custom exception for shared cluster detection timeout."""
378+
379+
pass
380+
381+
376382
@pytest.fixture(scope="module")
377383
@pytest.mark.usefixtures("setup_credentials")
378384
def shared_clusters_factory(request):
@@ -383,11 +389,17 @@ def shared_clusters_factory(request):
383389
"""
384390
factory = ClustersFactory(delete_logs_on_success=request.config.getoption("delete_logs_on_success"))
385391

386-
if not hasattr(request.module, "shared_existing_cluster"):
387-
request.module.shared_existing_cluster = None
392+
if not hasattr(request.module, "is_cluster_started_to_create"):
393+
logging.info("Setting is_cluster_started_to_create and shared_existing_cluster")
388394
request.module.is_cluster_started_to_create = False
395+
request.module.shared_existing_cluster = None
389396

390397
def _cluster_factory(cluster_config, region, upper_case_cluster_name=False, custom_cli_credentials=None, **kwargs):
398+
logging.info(
399+
"Shared cluster already started to create"
400+
if request.module.is_cluster_started_to_create
401+
else "Start to create shared cluster"
402+
)
391403
if request.module.is_cluster_started_to_create:
392404
for retry in range(40):
393405
if request.module.shared_existing_cluster:

0 commit comments

Comments
 (0)