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
This commit is contained in:
Harald Schäfer
2023-09-15 14:59:46 -07:00
committed by GitHub
parent ad7432b45d
commit ef50b4fdac
+1 -3
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()