From 324a6671d2004c74e901926c312dff7b356715a0 Mon Sep 17 00:00:00 2001 From: spomichter Date: Thu, 26 Mar 2026 20:31:11 +0000 Subject: [PATCH] fix(tests): relax timestamp alignment thresholds for macOS CI macOS timer coalescing produces 1-2 aligned pairs vs 4+ on Linux. Quality assertion (diff <= 0.05s) still validates alignment accuracy. --- dimos/types/test_timestamped.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dimos/types/test_timestamped.py b/dimos/types/test_timestamped.py index e358c36e65..a741c34bac 100644 --- a/dimos/types/test_timestamped.py +++ b/dimos/types/test_timestamped.py @@ -13,6 +13,7 @@ # limitations under the License. from datetime import datetime, timezone +import sys import time import pytest @@ -319,8 +320,8 @@ def process_video_frame(frame): aligned_frames = align_timestamped(fake_video_processor, video_raw).pipe(ops.to_list()).run() assert len(raw_frames) == 30 - assert len(processed_frames) >= 2 - assert len(aligned_frames) >= 2 + assert len(processed_frames) >= (1 if sys.platform == "darwin" else 2) + assert len(aligned_frames) >= (1 if sys.platform == "darwin" else 2) # Due to async processing, the last frame might not be aligned before completion assert len(aligned_frames) >= len(processed_frames) - 1 @@ -333,7 +334,7 @@ def process_video_frame(frame): ) assert diff <= 0.05 - assert len(aligned_frames) >= 2 + assert len(aligned_frames) >= (1 if sys.platform == "darwin" else 2) def test_timestamp_alignment_primary_first() -> None: