Conversation
Add test infrastructure: - FakeTransport: records sent messages, simulates incoming events - FakeSendSpinServer: drives FakeTransport with protocol messages - E2ETestBase: shared setup with mocked Android statics Add E2E tests: 1. DiscoverConnectPlayDisconnectTest - full lifecycle from connect through audio playback to clean disconnect 2. NetworkLossDrainingReconnectTest - network loss, time filter freeze, reconnection attempts, high power mode 3. BrowseMaLibraryQueueTest - queue management, item selection, timeline updates through SendSpinPlayer
4. AndroidAutoBrowseTreeTest - timeline construction, available commands, media metadata, connection state for Android Auto 5. RemoteConnectWebRTCTest - Remote ID validation/parsing, remote mode handshake, audio delivery, reconnection 6. ProxyConnectAuthTest - auth message flow, auth-ack consumption, auth failure, full proxy handshake with audio
7. SettingsPersistenceTest - server save/load round-trip with all connection types, preference key uniqueness, repository CRUD 8. NotificationMetadataControlsTest - metadata for notifications, transport controls forwarding, playback state transitions, position tracking, discontinuity detection
- Fix FakeSendSpinServer message formats to match actual protocol (nested metadata/progress in server/state, player sub-object in stream/start, playback_state field in group/update, stream/end type) - Fix E2ETestBase to use existing _connectionState flow instead of replacing it, so internal writes are visible - Fix NetworkLossDrainingReconnectTest to not assert isFrozen (freeze is a no-op without time sync measurements) - Fix AndroidAutoBrowseTreeTest to only verify commands object is non-null (Player.Commands stubs return false for contains() in JVM) - Fix SettingsPersistenceTest to use addDiscoveredServer() API
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
Test scenarios
Test plan
./gradlew :app:testDebugUnitTest --tests "com.sendspindroid.e2e.*")