Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ def __call__(self, message: str) -> bool:

return False

def is_progress_succesfully_finished(self) -> bool:
return all(
round(progress, 1) == 1.0 for progress in self._current_progress.values()
)

def get_current_progress(self):
return self._current_progress.values()


def wait_for_pipeline_state(
current_state: RunningState,
Expand Down Expand Up @@ -327,10 +335,21 @@ def expected_service_running(
with log_context(logging.INFO, msg="Waiting for node to run") as ctx:
waiter = SocketIONodeProgressCompleteWaiter(node_id=node_id, logger=ctx.logger)
service_running = ServiceRunning(iframe_locator=None)
with websocket.expect_event("framereceived", waiter, timeout=timeout):
if press_start_button:
_trigger_service_start(page, node_id)
yield service_running

try:
with websocket.expect_event("framereceived", waiter, timeout=timeout):
if press_start_button:
_trigger_service_start(page, node_id)
except TimeoutError:
if waiter.is_progress_succesfully_finished() is False:
ctx.logger.warning(
"⚠️ Progress bar didn't receive 100 percent: %s ⚠️", # https://github.com/ITISFoundation/osparc-simcore/issues/6449
waiter.get_current_progress(),
)
else:
raise

yield service_running

service_running.iframe_locator = page.frame_locator(
f'[osparc-test-id="iframe_{node_id}"]'
Expand Down
Loading