Three tests in test_integration_stdout.py intermittently fail on the Android (API 31, NDK 27) CI job:
test_capture_stdout
test_dynamic_sdk_name_override
test_sdk_name_override
The failure is in assert_timestamp (tests/assertions.py:358-359):
def assert_timestamp(ts):
elapsed_time = datetime.now(UTC) - datetime.fromisoformat(ts)
assert elapsed_time.total_seconds() < 10
The elapsed time is ~70–80 seconds instead of <10, e.g. assert 79.08 < 10.
Occurrences (5 failures, Feb 13–20):
- https://github.com/getsentry/sentry-native/actions/runs/22217536449/attempts/2
- https://github.com/getsentry/sentry-native/actions/runs/22217536449
- https://github.com/getsentry/sentry-native/actions/runs/22095529728
- https://github.com/getsentry/sentry-native/actions/runs/22020903492
- https://github.com/getsentry/sentry-native/actions/runs/21983848386
No occurrences before Feb 13 going back to Oct 2025. One re-run (#3) succeeded, one re-run (#1→#2) failed again. Spans 3 different branches, so not caused by a code change. Only affects Android API 31 — API 21 and API 35 jobs in the same runs pass.
Possible cause: The Android emulator's system clock may be ~70–80 seconds behind the host's UTC. The SDK timestamps the event using the emulator clock, but assert_timestamp compares against datetime.now(UTC) on the host.
Three tests in
test_integration_stdout.pyintermittently fail on the Android (API 31, NDK 27) CI job:test_capture_stdouttest_dynamic_sdk_name_overridetest_sdk_name_overrideThe failure is in
assert_timestamp(tests/assertions.py:358-359):The elapsed time is ~70–80 seconds instead of <10, e.g.
assert 79.08 < 10.Occurrences (5 failures, Feb 13–20):
No occurrences before Feb 13 going back to Oct 2025. One re-run (#3) succeeded, one re-run (#1→#2) failed again. Spans 3 different branches, so not caused by a code change. Only affects Android API 31 — API 21 and API 35 jobs in the same runs pass.
Possible cause: The Android emulator's system clock may be ~70–80 seconds behind the host's UTC. The SDK timestamps the event using the emulator clock, but
assert_timestampcompares againstdatetime.now(UTC)on the host.