Repository navigation
test: scrub stack frame line numbers from Verify snapshots - #6088
Conversation
Edits above a call site in a test file shifted the recorded LineNumber and churned the snapshot with no change in behaviour. The stack frame converter now normalises LineNumber and ColumnNumber to a sentinel when present, as it already does for FunctionId and InstructionAddress. Fixes #6085 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR risk: lowFor commit This label is a hint for reviewers, not an approval. |
There was a problem hiding this comment.
Good to approve, with optional comments
Test-only change that fixes the cause in #6085: StackFrameConverter writes LineNumber/ColumnNumber as _ when present and keeps null when absent, so snapshots no longer churn on unrelated edits. The new commit deletes the Serilog Simple Net4_8/Mono4_0 snapshots, which is safe because test/Sentry.Serilog.Tests/IntegrationTests.verify.cs is wrapped in #if NET6_0_OR_GREATER, so no .NET Framework or Mono test could ever match them.
- Optional: the PR description is now stale. It says the values are normalised to
1and that theNet4_8snapshots were hand-edited, but they are written as_and the SerilogNet4_8snapshot was deleted. Worth updating, since the description may end up in the squash commit. - Optional:
test/Sentry.NLog.Tests/IntegrationTests.Simple.Net4_8.verified.txtis still hand-edited and only runs on Windows, so confirm the Windows test job passes on this head before merging.
This is an automated preliminary review.
A sentinel of 1 read like a real line number. 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 #6088 +/- ##
=======================================
Coverage 78.51% 78.52%
=======================================
Files 539 539
Lines 20194 20194
Branches 4062 4062
=======================================
+ Hits 15856 15857 +1
+ Misses 3492 3491 -1
Partials 846 846 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
IntegrationTests.verify.cs is compiled only for NET6_0_OR_GREATER, so these snapshots were never checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Snapshots that capture stack traces recorded each frame's
LineNumberandColumnNumber, so any edit above the call site in the test file churned them (#6084 hit this with a#pragma).The shared
StackFrameConverterintest/Sentry.Testing/VerifyExtensions.csnow normalises both to1when present, the same way it already handlesFunctionIdandInstructionAddress. Snapshots still record that a line number was captured, just not which one. Mono still recordsnull, unchanged.The
Net4_8snapshots are Windows-only, so they were edited by hand to match.Closes #6085
#skip-changelog
🤖 Generated with Claude Code