• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / swift-sdk / 28870957209
94%

Build:
DEFAULT BRANCH: master
Ran 07 Jul 2026 01:56PM UTC
Jobs 1
Files 77
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jul 2026 01:43PM UTC coverage: 93.859% (+0.03%) from 93.833%
28870957209

push

github

web-flow
[FSSDK-12729] fix: prevent EXC_BAD_ACCESS from premature URLSession deallocation (#649)

* fix: move URLSession.finishTasksAndInvalidate() into async callbacks

The defer block fires at synchronous scope exit — before the async
URLSession callback runs — deallocating the session while the request
is still in-flight. This causes EXC_BAD_ACCESS, especially when
Firebase Performance Monitoring swizzles URLSession delegate methods.

Move session.finishTasksAndInvalidate() from the outer defer into the
completion callback body (or inner defer for ODP modules) so the
session stays alive until the response is fully processed.

Affected modules:
- DefaultDatafileHandler.downloadDatafile()
- DefaultEventDispatcher.sendEvent()
- OdpEventApiManager.sendOdpEvents()
- OdpSegmentApiManager.fetchSegments()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: fix race in MockUrlSession session counter

MockUrlSession used lock.async for both incrementing (init) and
decrementing (finishTasksAndInvalidate) validSessions. With the
URLSession fix moving invalidation into the async callback, the
decrement could still be pending when tearDown asserts the counter
is zero.

Change lock.async to lock.sync so counter updates complete before
the caller proceeds, eliminating the race between finishTasksAndInvalidate
and the test assertion in tearDown.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback from Copilot

- DefaultDatafileHandler: call completionHandler with failure result
  when getRequest returns nil, preventing caller deadlock on
  DispatchGroup.wait()
- MockUrlSession: make lock static so all instances share a single
  serial queue for the static validSessions counter

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

1 of 1 new or added line in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

1131 of 1205 relevant lines covered (93.86%)

8933.59 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
95.45
0.72% Sources/Implementation/Events/BatchEventBuilder.swift
Jobs
ID Job ID Ran Files Coverage
1 28870957209.1 07 Jul 2026 01:56PM UTC 77
93.86
GitHub Action Run
Source Files on build 28870957209
  • Tree
  • List 77
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ec1bb379 on github
  • Prev Build on master (#28036748129)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc