Skip to content

Add audio-reliability tests for interruption, routes and media reset - #12

Merged
PetrShtuka merged 1 commit into
mainfrom
chore/audio-reliability-tests
Aug 7, 2026
Merged

Add audio-reliability tests for interruption, routes and media reset#12
PetrShtuka merged 1 commit into
mainfrom
chore/audio-reliability-tests

Conversation

@PetrShtuka

Copy link
Copy Markdown
Owner

Что

Unit-покрытие аудио-надёжности, которого не было: код (interruption с shouldResume, route change, media-services reset, восстановление speaker) появился в 0.4.0, но тестами не закрывался.

Тесты (9 кейсов, CallWaveAudioReliabilityTests.m)

  • Interruption began — звуковое устройство сбрасывается, событие публикуется;
  • Interruption ended + ShouldResume — сессия реактивируется при живом звонке;
  • Interruption ended без ShouldResume — реактивации нет (обычный телефонный звонок не отбирает аудио обратно);
  • ShouldResume без звонков — сессия не поднимается;
  • Route change — публикуется актуальный маршрут;
  • Потеря BT-маршрута — speaker-предпочтение сохраняется и маршрут восстанавливается;
  • Speaker сбрасывается только явным действием пользователя;
  • Media-services reset — переконфигурация и реактивация при живом звонке;
  • CallWaveAudioRoute — Bluetooth и speaker независимы.

Тесты драйвят приватные entry point'ы уведомлений через test-only category, как существующий CallWaveClientReliabilityTests.

Прогон

Scripts/run-package-tests.sh: все сьюты зелёные, включая 9 новых тестов (полный прогон: 54 Swift + ObjC-таргеты, 0 падений).

Независим от #11, конфликтов нет.

Covers the coordinator paths that previously had no unit coverage:

- interruption began drops the sound device and publishes its state;
- interruption ended with ShouldResume reactivates the session when a
  call is live, and stays inactive without ShouldResume or without
  calls;
- a route change publishes the current route;
- the speaker preference survives a Bluetooth route loss and is only
  cleared by an explicit user action;
- a media-services reset reconfigures and reactivates the session;
- CallWaveAudioRoute reports Bluetooth and speaker independently.

The tests drive the private notification entry points through a
test-only category, like the existing reliability suite.
@PetrShtuka
PetrShtuka merged commit 00caab0 into main Aug 7, 2026
4 checks passed
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.

1 participant