-
-
Notifications
You must be signed in to change notification settings - Fork 167
test: add comprehensive Realtime test coverage #755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Add 84 new tests across 8 test files covering core Realtime functionality: - PostgresAction: 15 tests for PostgreSQL change events and data structures - RealtimeError: 5 tests for error handling and descriptions - Types: 14 tests for client options and configuration - RealtimeJoinConfig: 22 tests for channel join configurations - PushV2: 4 tests for message pushing functionality - WebSocket: 8 tests for WebSocket protocol abstraction - URLSessionWebSocket: 15 tests for URLSession WebSocket implementation - Exports: 1 test validating @_exported imports All tests follow existing project conventions and provide comprehensive coverage for public APIs, error handling, edge cases, and protocol conformances. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix all concurrency safety errors that were causing build failures in Xcode 15.4: - URLSessionWebSocketTests.swift: Fixed mutations of captured variables in @sendable closures - WebSocketTests.swift: Fixed mutation of receivedEvent variable in @sendable closure Used thread-safe wrapper classes with NSLock to ensure proper synchronization while maintaining the same test functionality and coverage. All 84 tests now pass successfully with strict concurrency checking enabled. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Pull Request Test Coverage Report for Build 16592753250Details
💛 - Coveralls |
Replace custom thread-safe wrapper classes with the existing LockIsolated type that's already used throughout the codebase for synchronized critical state. This provides better consistency with the project's existing patterns and reduces code duplication. Added ConcurrencyExtras import to access LockIsolated. All 84 tests continue to pass with this cleaner implementation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Applied swift-format to all modified test files to ensure consistent code style throughout the project: - URLSessionWebSocketTests.swift - WebSocketTests.swift - ExportsTests.swift - PostgresActionTests.swift - PushV2Tests.swift - RealtimeErrorTests.swift - RealtimeJoinConfigTests.swift - TypesTests.swift All 84 tests continue to pass after formatting. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
dshukertjr
approved these changes
Jul 29, 2025
🎉 This PR is included in version 2.31.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 Coverage Added
Test Quality Features
✅ Comprehensive API coverage for all public interfaces
✅ Error handling and edge case validation
✅ Protocol conformance testing (Codable, Equatable, Hashable)
✅ JSON encoding/decoding with various data types
✅ Mock objects for WebSocket testing without external dependencies
✅ Async/await support where applicable
✅ Boundary condition testing with nil values and empty data
Test plan
🤖 Generated with Claude Code