Repository navigation
test: clear leftover queue files before each ignoredExceptionTypes capture test - #920
Merged
Merged
Conversation
…pture test storage.reset() keeps the event queue, and getBatchedEvents returns once the mock receives a batch, before the SDK deletes the sent file. The previous test's $exception could survive on disk and be resent by the next SDK, failing the "drops ignored types" assertion on the iOS simulator job. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dustinbyrne
approved these changes
Oct 7, 2026
turnipdabeets
enabled auto-merge (squash)
October 7, 2026 19:16
The migration test slept a fixed 150ms after unblocking the background migration, which a slow CI simulator can outrun. Off the main thread migration runs inline inside add(), so signal once add() returns and wait on that. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
4 tasks done
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.
💡 Motivation and Context
ErrorTracking ignoredExceptionTypes capture pathsis flaky on the iOS simulator job.captureException still drops ignored types…sometimes sees one$exceptionevent (e.g. this run).The test before it captures a non-ignored
$exception.getBatchedEventsreturns once the mock receives the batch, which can be before the SDK deletes the sent file, andstorage.reset()intentionally keeps the event queue. So that event can still be on disk when the next test's SDK starts with the same token, and it gets sent again.getSutnow clears the app-support directory first, same asPostHogSDKPersonProfilesTest.💚 How did you test it?
make test filter=ErrorTrackingIgnoredTypespassed 3/3 locally (macOS). It's a timing race, so this shows the change doesn't break anything, not that the flake is gone.📝 Checklist
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code found the cause in the iOS simulator test log on #903 and applied the fix. The same race exists on
main, so it's fixed here directly instead of waiting for the v4 chain to merge. Test-only change, no changeset.🤖 Generated with Claude Code