Skip to content

Commit

Permalink
Test modeld: 3s enough for modeld startup (commaai#29936)
Browse files Browse the repository at this point in the history
* Test modeld: 3s enough for modeld startup

* Always fails when you send frames before modeld is ready

* Wait for modeld to read
  • Loading branch information
haraschax authored Sep 15, 2023
1 parent ad7432b commit ef50b4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions selfdrive/modeld/tests/test_modeld.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
import time
import unittest
import numpy as np
import random
Expand Down Expand Up @@ -27,8 +26,7 @@ def setUp(self):
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()
Expand Down

0 comments on commit ef50b4f

Please sign in to comment.