Test modeld: 3s enough for modeld startup (#29936)

* Test modeld: 3s enough for modeld startup

* Always fails when you send frames before modeld is ready

* Wait for modeld to read
old-commit-hash: ef50b4fdac
test-msgs
Harald Schäfer 2 years ago committed by GitHub
parent 1ef92c57f2
commit 5bb0112fdd
  1. 4
      selfdrive/modeld/tests/test_modeld.py

@ -1,5 +1,4 @@
#!/usr/bin/env python3
import time
import unittest
import numpy as np
import random
@ -27,8 +26,7 @@ class TestModeld(unittest.TestCase):
self.pm = messaging.PubMaster(['roadCameraState', 'wideRoadCameraState', 'liveCalibration', 'lateralPlan'])
managed_processes['modeld'].start()
time.sleep(0.2)
self.sm.update(1000)
self.pm.wait_for_readers_to_update("roadCameraState", 10)
def tearDown(self):
managed_processes['modeld'].stop()

Loading…
Cancel
Save