From ba80a30f35ed1f1133d9da9322bef7d423ec893f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Thu, 3 Apr 2025 20:20:00 -0700 Subject: [PATCH] Or timeout --- selfdrive/locationd/test/test_lagd.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/selfdrive/locationd/test/test_lagd.py b/selfdrive/locationd/test/test_lagd.py index d3b1d7538d..546c6306b3 100644 --- a/selfdrive/locationd/test/test_lagd.py +++ b/selfdrive/locationd/test/test_lagd.py @@ -91,12 +91,12 @@ class TestLagd: assert output.liveDelay.validBlocks == 1 @pytest.mark.skipif(PC, reason="only on device") + @pytest.mark.timeout(30) def test_estimator_performance(self): mocked_CP = mock.Mock(steerActuatorDelay=0.1) estimator = LateralLagEstimator(mocked_CP, 0.05) ds = [] - test_start = time.perf_counter() for _ in range(1000): st = time.perf_counter() estimator.update_points() @@ -104,8 +104,4 @@ class TestLagd: d = time.perf_counter() - st ds.append(d) - # limit the test to 20 seconds - if time.perf_counter() - test_start > 20.0: - break - assert np.mean(ds) < 0.05