test(tracing): Print count and debug output in assertion helpers#1236
Merged
Conversation
When get_and_assert_only_item fails, the panic message now includes how many items were found and their Debug representation. This makes flaky test failures easier to diagnose. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
szokeasaurusrex
approved these changes
Jul 10, 2026
szokeasaurusrex
left a comment
Member
There was a problem hiding this comment.
Nice, thanks! This will be super helpful to debug the flakes
If you get any debug output from this, please post on the issue. We could also include a link to the flakiness issue in the specific test's output with a request to report any debug logs on that issue when the test flakes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I encountered the failing test described in #1112 again in https://github.com/getsentry/sentry-rust/actions/runs/29080836630/job/86323043895?pr=1214.
Given that that test failure could indicate a problem in the SDK, I'm making this change to the assertion helper to print more information, which will help understand what's going on.
Refs #1112
#skip-changelog