Repository navigation
test: flush explicitly in the msbuild integration test app - #5689
Merged
Merged
Conversation
The generated app relied on the ProcessExit handler to flush its only event within the 2s default ShutdownTimeout. On a loaded Windows runner the first HttpClient send from a cold process can take longer than that, so the envelope was dropped and the assertion failed. Closes #5617 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5689 +/- ##
==========================================
- Coverage 75.21% 75.12% -0.09%
==========================================
Files 515 515
Lines 18989 18989
Branches 3693 3693
==========================================
- Hits 14282 14265 -17
- Misses 3852 3868 +16
- Partials 855 856 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The app generated by the msbuild integration test never flushed explicitly, so delivering its only event depended on the
ProcessExithandler, which gives up after the default 2sShutdownTimeout. On a loaded Windows runner, the firstHttpClient.SendAsyncfrom a cold process can take longer than that. In both failing runs the background worker never logged "Envelope handed off to transport" before the flush timed out, and the mock server got no POST.The app now calls
SentrySdk.Flush(TimeSpan.FromSeconds(30))after capturing. That's also what we recommend for short-lived apps. Theusing System;is needed because the net5.0 context builds with SDK 5.0.400, which has no implicit usings.None of the other Pester tests make the same assumption:
aot.Tests.ps1doesn't assert on envelopes,runtime.Tests.ps1andnet4-consoleuse aFakeTransportthat writes synchronously to stdout, and the native-crash and mobile tests send through the native SDKs.Closes #5617
#skip-changelog
🤖 Generated with Claude Code