From 748c725e3e63a3e4625092d1e87afb147e6ec643 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 15 Aug 2026 12:39:26 -0700 Subject: [PATCH] soundd: more robust test (#38635) --- openpilot/selfdrive/ui/tests/test_soundd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openpilot/selfdrive/ui/tests/test_soundd.py b/openpilot/selfdrive/ui/tests/test_soundd.py index 11349f1f40..ca3b7ab209 100644 --- a/openpilot/selfdrive/ui/tests/test_soundd.py +++ b/openpilot/selfdrive/ui/tests/test_soundd.py @@ -19,14 +19,14 @@ class TestSoundd(OpenpilotTestCase): sm.update(100) assert sm.updated['selfdriveState'] - received_at = sm.recv_time['selfdriveState'] - clock = mocker.patch("openpilot.selfdrive.ui.soundd.time.monotonic", return_value=received_at + SELFDRIVE_STATE_TIMEOUT) + sm.recv_time['selfdriveState'] = 0 + clock = mocker.patch("openpilot.selfdrive.ui.soundd.time.monotonic", return_value=SELFDRIVE_STATE_TIMEOUT) assert not check_selfdrive_timeout_alert(sm) - clock.return_value = received_at + SELFDRIVE_STATE_TIMEOUT + 0.1 + clock.return_value = SELFDRIVE_STATE_TIMEOUT + 0.1 assert check_selfdrive_timeout_alert(sm) - clock.return_value = received_at + SELFDRIVE_STATE_TIMEOUT + 10 + clock.return_value = SELFDRIVE_STATE_TIMEOUT + 10 assert not check_selfdrive_timeout_alert(sm) # TODO: add test with micd for checking that soundd actually outputs sounds