Pytest: enforce a default timeout (#29793)

* pytest: enforce default timeout

* disable that for now

* 30 second timeout on tests
old-commit-hash: b0a71d45536d6fe0c0e8365913c6ffbc64a58b1b
This commit is contained in:
Justin Newberry
2023-09-07 17:53:51 -07:00
committed by GitHub
parent 268337f32b
commit 5b1e60f5da
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ jobs:
timeout-minutes: 40
run: |
${{ env.RUN }} "export SKIP_LONG_TESTS=1 && \
$PYTEST -n auto --dist=loadscope && \
$PYTEST -n auto --dist=loadscope --timeout 30 && \
selfdrive/locationd/test/_test_locationd_lib.py && \
./system/ubloxd/tests/test_glonass_runner && \
./selfdrive/ui/tests/create_test_translations.sh && \
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import pytest
import random
import time
import unittest
@@ -224,6 +225,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
self._assert_timing(vin_time / self.N, vin_ref_time)
print(f'get_vin, query time={vin_time / self.N} seconds')
@pytest.mark.timeout(60)
def test_fw_query_timing(self):
total_ref_time = 6.07
brand_ref_times = {
+1 -1
View File
@@ -99,7 +99,7 @@ class TestUbloxProcessing(unittest.TestCase):
rcv_msgs = []
for msg in self.ublox_raw:
ur_pm.send(msg.which(), msg.as_builder())
time.sleep(0.01)
time.sleep(0.001)
rcv_msgs += messaging.drain_sock(ugs)
time.sleep(0.1)