Skip to content

test(ws): add unit tests for WebSocket ConnectionManager and heartbeat - #739

Merged
Sadeequ merged 1 commit into
StellarFlow-Network:mainfrom
mijinummi:unit-tests-WebSocket
Jul 29, 2026
Merged

test(ws): add unit tests for WebSocket ConnectionManager and heartbeat#739
Sadeequ merged 1 commit into
StellarFlow-Network:mainfrom
mijinummi:unit-tests-WebSocket

Conversation

@mijinummi

Copy link
Copy Markdown
Contributor

🧪 Unit Tests: WebSocket Broadcaster & Heartbeat (#723)

📝 Summary

Adds comprehensive unit tests for the WebSocket ConnectionManager and heartbeat session lifecycle in stellarflow-backend/tests/test_websocket_manager.py.

closes #723

🛠️ Test Coverage

  • Lifecycle: Verifies client connection state tracking and clean channel cleanup on disconnect.
  • Pub/Sub Subscriptions: Tests topic subscription/unsubscription mapping logic (subscribe:pool:XLM-USDC).
  • Broadcasting: Confirms JSON payload delivery across subscribed client WebSockets.
  • Heartbeat Pruning: Confirms stale/unresponsive client connections are disconnected when heartbeat pings fail.
pytest stellarflow-backend/tests/test_websocket_manager.py

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@mijinummi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Sadeequ
Sadeequ merged commit ae1ddab into StellarFlow-Network:main Jul 29, 2026
1 check failed
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.

🔔 WS-Broadcaster | Multi-Channel Pub/Sub WebSocket Service for Frontends

2 participants