Skip to content

Conversation

philipphofmann
Copy link
Member

This PR is based on #5902 and #5903. We must merge these before merging this PR.

Add a custom Swift lint rule for using DispatchGroups in unit tests to
ensure using XCTestExpectations instead.

Fixes #5789

Replace DispatchGroup with XCTextExpectation in SentryTracerTests.
Replace DispatchGroup with XCTextExpectation in
SentryHttpTransportFlushIntegrationTests.
Add a custom swift lint rule for using DispatchGroups in unit tests to
ensure using XCTestExpectations instead.

Fixes GH-5789
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.

Even though it is a draft, LGTM, great idea to add a custom SwiftLint rule!

Base automatically changed from test/use-xctestexcpectation-sentry-tracer to main August 13, 2025 08:32
@philipphofmann philipphofmann marked this pull request as ready for review August 13, 2025 08:32
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.675%. Comparing base (ef46b05) to head (9bfa930).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5904       +/-   ##
=============================================
+ Coverage   86.393%   86.675%   +0.281%     
=============================================
  Files          417       423        +6     
  Lines        36197     36550      +353     
  Branches     15396     17295     +1899     
=============================================
+ Hits         31272     31680      +408     
+ Misses        4882      4823       -59     
- Partials        43        47        +4     

see 57 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 ef46b05...9bfa930. Read the comment docs.

@philipphofmann philipphofmann merged commit ce73e1b into main Aug 13, 2025
54 checks passed
@philipphofmann philipphofmann deleted the test/swiftlint-dispatchgroup branch August 13, 2025 11:45
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.

Remove DispatchGroups from UnitTests

2 participants