Skip to content

test: Assert presence of profile chunks after session shutdown#6213

Open
alexander-alderman-webb wants to merge 1 commit intomasterfrom
webb/profiler/fix-flakes
Open

test: Assert presence of profile chunks after session shutdown#6213
alexander-alderman-webb wants to merge 1 commit intomasterfrom
webb/profiler/fix-flakes

Conversation

@alexander-alderman-webb
Copy link
Copy Markdown
Contributor

@alexander-alderman-webb alexander-alderman-webb commented May 6, 2026

Description

Follows on from #6174 as other tests started flaking due to the same cause. The race is that assertions run before profiles reach the transport on the thread.

For example, in https://github.com/getsentry/sentry-python/actions/runs/25435862082/job/74613765358?pr=6193, the traceback is

=================================== FAILURES ===================================
______________ test_continuous_profiler_run_does_not_null_buffer _______________
tests/profiler/test_continuous_profiler.py:666: in test_continuous_profiler_run_does_not_null_buffer
    assert_single_transaction_with_profile_chunks(envelopes, thread)
tests/profiler/test_continuous_profiler.py:147: in assert_single_transaction_with_profile_chunks
    assert len(items["profile_chunk"]) > 0
E   assert 0 > 0
E    +  where 0 = len([])

Issues

Reminders

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 7.71s

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 15003 uncovered lines.


Generated by Codecov Action

@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review May 6, 2026 13:36
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner May 6, 2026 13:36
@alexander-alderman-webb alexander-alderman-webb changed the title test: Assert presence profile chunks after session shutdown test: Assert presence of profile chunks after session shutdown May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant