From caa5a5e06fefafcafacfd6733437a2504d608346 Mon Sep 17 00:00:00 2001 From: MoritzWeber Date: Thu, 21 Nov 2024 13:08:16 +0100 Subject: [PATCH] chore: Change idle time unavailable message if metrics not found "Unknown session" could be interpreted as "The session doesn't exist", but that is not true. The session exists and only the metrics are not available. --- backend/capellacollab/sessions/injection.py | 2 +- backend/tests/sessions/test_session_injection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/capellacollab/sessions/injection.py b/backend/capellacollab/sessions/injection.py index d0fa665df..9a375bf0f 100644 --- a/backend/capellacollab/sessions/injection.py +++ b/backend/capellacollab/sessions/injection.py @@ -48,6 +48,6 @@ def get_idle_state(sid: str) -> sessions_models2.IdleState: return sessions_models2.IdleState( available=False, - unavailable_reason="Unknown session", + unavailable_reason="No metrics found for session", terminate_after_minutes=config.sessions.timeout, ) diff --git a/backend/tests/sessions/test_session_injection.py b/backend/tests/sessions/test_session_injection.py index 0e8069782..387579f67 100644 --- a/backend/tests/sessions/test_session_injection.py +++ b/backend/tests/sessions/test_session_injection.py @@ -43,7 +43,7 @@ def test_get_idle_status_unknown_session(): assert injection.get_idle_state("test") == models2_sessions.IdleState( available=False, - unavailable_reason="Unknown session", + unavailable_reason="No metrics found for session", terminate_after_minutes=90, )