fix(tests): Fix flaky continuous profiler test under gevent #5899
+18
−3
@sentry/warden / warden: find-bugs
completed
Mar 27, 2026 in 34s
1 issue
find-bugs: Found 1 issue (1 low)
Low
Polling loop may use stale items if profile chunks arrive after timeout check - `tests/profiler/test_continuous_profiler.py:153-159`
The polling loop in assert_single_transaction_with_profile_chunks exits when the deadline is reached, but the items variable used for subsequent assertions reflects the state at the last poll iteration. If profile chunks arrive between the final timeout check (line 157) and the assertion (line 162), the test will fail despite chunks being present. This is a narrow race window but could still contribute to flakiness rather than eliminating it.
Duration: 30.7s · Tokens: 26.4k in / 1.2k out · Cost: $0.13 (+extraction: $0.00, +fix_gate: $0.00)
Loading