File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22from dummysensors .orchestrator import run_stream
33from .utils import Capture
4+ import math
45
56def test_per_sensor_rate_hz_controls_sampling_frequency ():
67 cap = Capture ()
@@ -16,7 +17,7 @@ def test_per_sensor_rate_hz_controls_sampling_frequency():
1617 spec_str = "device=A: temp*1,vibration*1" ,
1718 rate_hz = 10.0 , # global tick
1819 duration_s = None ,
19- total_count = 20 , # ~2 .0s
20+ total_count = 60 , # ~6 .0s
2021 writer_for_type = {"*" : cap .router ({"*" : cap .writer_for_type ("*" )})},
2122 partition_by = "none" ,
2223 devices_cfg = devices_cfg ,
@@ -33,5 +34,5 @@ def test_per_sensor_rate_hz_controls_sampling_frequency():
3334
3435 # Expect significantly more vibration samples (10 Hz) than temperature (5 Hz).
3536 # Leave tolerance for CI timing jitter: require at least 1.5× more vib or +3 samples.
36- assert n_vib >= max (int ( 1.5 * n_temp ), n_temp + 3 ), \
37+ assert n_vib >= max (math . ceil ( 4 / 3 * n_temp ), n_temp + 3 ), \
3738 f"expected clearly more vib samples than temp; got temp={ n_temp } , vib={ n_vib } "
You can’t perform that action at this time.
0 commit comments