Skip to content

Conversation

philipphofmann
Copy link
Member

Replace the dispatch group with an XCTestExpectation to get a failure message when the wait times out. To make this work, this PR changes the method to an extension so it can call XCTestCase.wait. Furthermore, this PR reduces the timeout from 500s to 10s, because 500s is way too high and risks slowing down CI.

Contributes to GH-5789

#skip-changelog

Replace the dispatch group with an XCTestExpectation to get a failure
message when the wait times out. To make this work this PR changes the
method to an extension so it can call XCTestCase.wait. Furthermore, this
PR reduces the timeout from 500s to 10s, because 500s is way to high
and risks slowing down CI.

Contributes to GH-5789
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.655%. Comparing base (d23a1b1) to head (fe291c1).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5850       +/-   ##
=============================================
+ Coverage   86.554%   86.655%   +0.100%     
=============================================
  Files          422       423        +1     
  Lines        36273     36405      +132     
  Branches     17136     17229       +93     
=============================================
+ Hits         31396     31547      +151     
+ Misses        4833      4810       -23     
- Partials        44        48        +4     

see 25 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d23a1b1...fe291c1. Read the comment docs.

@philipphofmann philipphofmann changed the title test: Use XCTestExpectation for concurrent mods test: Use XCTestExpectation for concurrent modifications Aug 8, 2025
Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@philipphofmann philipphofmann merged commit a3dfd57 into main Aug 8, 2025
52 checks passed
@philipphofmann philipphofmann deleted the test/xctestexpectation-concurrent-modifications branch August 8, 2025 08:11
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
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