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: ef50b4fdacd64d748bd80db26645c8dc88843b37
This commit is contained in:
Harald Schäfer
2023-09-15 14:59:46 -07:00
committed by GitHub
parent 1ef92c57f2
commit 5bb0112fdd

View File

@@ -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()