Skip to content

test: disable sessions in stacktrace capture tests - #2208

Merged
jpnurmi merged 1 commit into
masterfrom
jpnurmi/test/stacktrace-session
Oct 15, 2026
Merged

jpnurmi merged 1 commit into
masterfrom
jpnurmi/test/stacktrace-session

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the following unit test failure on Switch:

Test attach_stacktrace_adds_thread_to_message_event...
...
[ FAILED ]
  test_basic.c:806: Check 2 == 1... failed
  test_basic.c:808: Check 0 == 1... failed
  test_basic.c:812: Check sentry_value_is_true(sentry_value_get_by_key(thread, "current"))... failed
  test_basic.c:818: Check sentry_value_get_type(frames) == SENTRY_VALUE_TYPE_LIST... failed

https://github.com/getsentry/sentry-switch/actions/runs/38732357928/job/116426400577

On Switch, the platform integration supplies a release, enabling automatic session tracking. sentry_close() then sends a session envelope in addition to the event expected by the tests added in #2195. Their callback counts this envelope and replaces the saved threads with null, failing all three capture tests.

Disable automatic session tracking in their shared setup, matching the neighboring capture tests.

On Switch, the platform integration supplies a release, enabling
automatic session tracking. `sentry_close()` then sends a session
envelope in addition to the event expected by the tests added in #2195.
Their callback counts this envelope and replaces the saved `threads`
with null, failing all three capture tests.

Disable automatic session tracking in their shared setup, matching the
neighboring capture tests.

Introduced by:
#2195

Failed CI job:
https://github.com/getsentry/sentry-switch/actions/runs/38732357928/job/116426400577
@jpnurmi
jpnurmi requested a review from JoshuaMoelans October 15, 2026 13:21
@jpnurmi
jpnurmi merged commit a68e011 into master Oct 15, 2026
71 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/test/stacktrace-session branch October 15, 2026 13:51
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.58%. Comparing base (d04453d) to head (439983e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2208      +/-   ##
==========================================
+ Coverage   75.55%   75.58%   +0.03%     
==========================================
  Files         103      103              
  Lines       28242    28242              
  Branches     5174     5174              
==========================================
+ Hits        21337    21348      +11     
+ Misses       5553     5545       -8     
+ Partials     1352     1349       -3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants