Repository navigation
test: [Sample Tests 2] Share the system-test envelope matchers - #6267
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
This was referenced Oct 15, 2026
In-module integration tests need the same envelope matchers the sample system tests use. TestHelper now delegates to the shared copies, so the sample tests keep working unchanged while they are moved. Mismatch diagnostics now flush System.out instead of closing it, which silenced all output after the first mismatch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
runningcode
force-pushed
the
no/shared-envelope-matchers
branch
from
October 15, 2026 14:23
47c6edc to
cf186ed
Compare
runningcode
force-pushed
the
no/mock-sentry-server
branch
from
October 15, 2026 14:23
ba3ad5c to
254fe63
Compare
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
This branch has not been deployed
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.
PR Stack (Sample Tests)
main)📜 Description
Moves the envelope matchers from
TestHelper(sentry-system-test-support) intosentry-test-support, as extension functions:SentryEnvelope.event(),transaction(),logs(),metrics(),profileChunk().SentryTransaction.hasSpanWithOp,SentryLogEvents.hasLogWithAttribute,SentryEvent.hasFlag. Like before, they returnfalseand print what they looked at, so tests can pick one envelope out of many.TestHelperkeeps its public methods and delegates to the shared code. That way the sample tests don't change, and only one copy of each matcher exists while they are being moved.Cleanups along the way:
TestHelpermethods each map onto one matcher with optional parameters:doesTransactionHaveOpanddoesTransactionHave→hasOpdoesTransactionContainSpanWithOpanddoesTransactionHaveSpanWith→hasSpanWithOpdoesTransactionContainSpanWithDescriptionis dropped.TestHelper.logObjectusedPrintWriter(System.out).use {}, which closesSystem.outand silenced every line after the first mismatch. It now flushes instead.💡 Motivation and Context
The in-module integration tests in the following PRs need these matchers. They can't depend on
sentry-system-test-support, because that module brings in:💚 How did you test it?
EnvelopeMatchersTestsends real transactions, events, logs and metrics throughMockSentryServerand checks positive and negative cases for each matcher.FROM-CACHE) and passed, which confirms theTestHelperdelegation.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
TestHelperandsentry-system-test-supportare deleted.#skip-changelog