Repository navigation
Test the signaling state machine on iOS and the web - #321
Merged
Merged
Conversation
- Angular's Vitest migration needs the `@angular/build` builders, so build, serve and extract-i18n move there too
- Names are reused, so a queue kept after giving up could later go to a stranger
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.
Summary
This adds unit tests for the signaling state machine on both clients: the same six checks on iOS and the web, each covering a failure we have hit before. To make that possible, signaling now gets its WebSocket, TURN, WebRTC and timer dependencies from outside, and the web moves from Karma to Vitest. The apps behave as before, except that the web now drops a peer's queued frames when it gives up on that peer, as iOS already does. The signaling logic itself is otherwise unchanged.
What changed
SignalingServiceon iOS takes its WebSocket, TURN source, WebRTC calls and clock throughinit(SignalTransport,IceServerSource,WebRTCEngine,any Clock<Duration>), and the app passes the real oneshandleChannelState(_:onChannel:)andhandleIceState(_:onConnection:)AppBuildInfo.isRunningTests)swift-clocks, and CI runs them on an iPhone simulator@angular/buildPeerConnectionFactoryWebSocketPrefixenum instead of raw strings