From 1da271f2af93eb3e6cd689252ed99390610acd5d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 21 Feb 2024 21:07:13 -0800 Subject: [PATCH] fix these too --- selfdrive/athena/tests/test_athenad_ping.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/selfdrive/athena/tests/test_athenad_ping.py b/selfdrive/athena/tests/test_athenad_ping.py index 6eaa983086..d5d25a2783 100755 --- a/selfdrive/athena/tests/test_athenad_ping.py +++ b/selfdrive/athena/tests/test_athenad_ping.py @@ -12,6 +12,8 @@ from openpilot.selfdrive.athena import athenad from openpilot.selfdrive.manager.helpers import write_onroad_params from openpilot.system.hardware import TICI +TIMEOUT_TOLERANCE = 10 # seconds + def wifi_radio(on: bool) -> None: if not TICI: @@ -92,12 +94,12 @@ class TestAthenadPing(unittest.TestCase): @unittest.skipIf(not TICI, "only run on desk") def test_offroad(self) -> None: write_onroad_params(False, self.params) - self.assertTimeout(100) # expect approx 90s + self.assertTimeout(60 + TIMEOUT_TOLERANCE) # based using TCP keepalive settings @unittest.skipIf(not TICI, "only run on desk") def test_onroad(self) -> None: write_onroad_params(True, self.params) - self.assertTimeout(30) # expect 20-30s + self.assertTimeout(21 + TIMEOUT_TOLERANCE) if __name__ == "__main__":