test: add integration tests for real-time collaboration WebSocket sessions - #1706
Open
mahek-builds wants to merge 8 commits into
Open
test: add integration tests for real-time collaboration WebSocket sessions#1706mahek-builds wants to merge 8 commits into
mahek-builds wants to merge 8 commits into
Conversation
mahek-builds
commented
Jul 28, 2026
mahek-builds
left a comment
Author
There was a problem hiding this comment.
pls review my pr and merge this and give me points for gssoc
Author
|
@imDarshanGK I fixed the issue |
Author
|
@imDarshanGK I fixed the issue |
Author
@imDarshanGK
FIXED
|
Owner
|
@mahek-builds issue number? |
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.





…sions
Description
Added integration tests for real-time collaboration WebSocket sessions to verify user presence synchronization, name parameter sanitization, and connection/session cleanup.
Specifically, added:
test_presence_sync_broadcasts_on_join_and_leave: Verifies that presence updates are correctly broadcasted when clients join or disconnect.test_presence_sync_handles_name_sanitization: Verifies name defaults (Anonymous), handling of whitespace, and enforcing name length limit constraints (throwing1008code).test_presence_sync_session_cleanup: Verifies that rooms are deleted and cleanly reset upon user disconnection.Related Issue
Fixes #
Type of change
Checklist
Screenshots (if frontend change)
Test evidence
backend/tests/test_collaboration_ws.py::test_collaboration_ws_connection PASSED
backend/tests/test_collaboration_ws.py::test_collaboration_ws_invalid_session PASSED
backend/tests/test_collaboration_code_update_broadcasts PASSED
backend/tests/test_collaboration_multiple_clients PASSED
backend/tests/test_collaboration_invalid_json_message PASSED
backend/tests/test_collaboration_ping_returns_pong PASSED
backend/tests/test_collaboration_ws.py::test_presence_sync_broadcasts_on_join_and_leave PASSED
backend/tests/test_collaboration_ws.py::test_presence_sync_handles_name_sanitization PASSED
backend/tests/test_collaboration_ws.py::test_presence_sync_session_cleanup PASSED
======================= 9 passed, 116 warnings in 5.72s =======================
pytest -v # paste output