feat(tests): more test helpers and features#1060
Merged
Merged
Conversation
9f7c9b8 to
d18a6d5
Compare
d9001f5 to
ba832f2
Compare
ba832f2 to
c77bb92
Compare
c77bb92 to
6211c9f
Compare
6211c9f to
aec18a5
Compare
sl0thentr0py
approved these changes
May 20, 2026
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.
New options in
Sentry.Test.setup_sentry/1:telemetry_processor— keyword list forwarded to the per-testSentry.TelemetryProcessor(e.g.buffer_configs,buffer_capacities,scheduler_weights,transport_capacity). Replaces the manualstop_supervised!+start_supervised!dance for tests that need a custom processor configuration.:collect_envelopes— when set, wires up a Bypass envelope collector automatically and returns its reference under:ref:true— collector with no filtering;[type: "check_in"]) — forwarded tosetup_bypass_envelope_collector/2to filter by envelope item type.Collapses the common
setup_bypass(...) + setup_bypass_envelope_collector(bypass)two-step into a single call:New test helpers in
Sentry.Test.Assertionsassert_sentry_transaction(ref, criteria)— collects exactly 1 transaction envelope viarefand asserts it matchescriteria. Returns the matched transaction. Reserved option::timeout(default 1000ms).find_sentry_transaction!(ref, criteria)— collects up to:counttransaction envelopes viarefand returns the first one matchingcriteria. Raises if none match. Reserved options::count(default 1),:timeout(default 1000ms).refute_sentry_check_in(ref, timeout)— flushes the TelemetryProcessor pipeline, then asserts no check-in envelope arrives at the Bypass collector withintimeout(default 100ms). Pair withSentry.Test.setup_sentry(collect_envelopes: [type: "check_in"]).Together they replace verbose usage like: