Skip to content

Commit b952b73

Browse files
committed
corrected trigger
1 parent 51d6c06 commit b952b73

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/playwright.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,9 @@ class ServiceRunning:
569569
iframe_locator: FrameLocator | None
570570

571571

572+
_MIN_TIMEOUT_WAITING_FOR_SERVICE_ENDPOINT: Final[int] = 30 * SECOND
573+
574+
572575
@contextlib.contextmanager
573576
def expected_service_running(
574577
*,
@@ -602,7 +605,10 @@ def expected_service_running(
602605
api_request_context=page.request,
603606
product_url=product_url,
604607
is_legacy_service=is_service_legacy,
605-
timeout=min(timeout - int(elapsed_time.total_seconds() * SECOND), 5 * SECOND),
608+
timeout=max(
609+
timeout - int(elapsed_time.total_seconds() * SECOND),
610+
_MIN_TIMEOUT_WAITING_FOR_SERVICE_ENDPOINT,
611+
),
606612
)
607613
service_running.iframe_locator = page.frame_locator(
608614
f'[osparc-test-id="iframe_{node_id}"]'
@@ -640,7 +646,10 @@ def wait_for_service_running(
640646
api_request_context=page.request,
641647
product_url=product_url,
642648
is_legacy_service=is_service_legacy,
643-
timeout=min(timeout - int(elapsed_time.total_seconds() * SECOND), 5 * SECOND),
649+
timeout=max(
650+
timeout - int(elapsed_time.total_seconds() * SECOND),
651+
_MIN_TIMEOUT_WAITING_FOR_SERVICE_ENDPOINT,
652+
),
644653
)
645654
return page.frame_locator(f'[osparc-test-id="iframe_{node_id}"]')
646655

0 commit comments

Comments
 (0)