Skip to content

Commit 4b54261

Browse files
jpnurmicodex
andcommitted
test: Handle daemon log timestamp truncation
Allow a small timestamp margin when matching daemon logs so filesystem mtime precision does not make the wait helper skip the current log. Co-Authored-By: OpenAI Codex <noreply@openai.com>
1 parent 92ddd62 commit 4b54261

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/assertions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,9 @@ def wait_for_file(path, timeout=10.0, interval=0.1):
663663

664664

665665
def wait_for_daemon(tmp_path, started_at, timeout=10.0):
666-
from pathlib import Path
667-
668666
db_dir = Path(tmp_path) / ".sentry-native"
667+
# Account for filesystems that truncate mtimes below time.time() precision.
668+
started_at -= 1.0
669669

670670
def is_done():
671671
for log_path in db_dir.glob("sentry-daemon-*.log"):

0 commit comments

Comments
 (0)