test: stress tests for sync handshake under concurrent mutations#219
Merged
Merged
Conversation
2 tasks
Add TestSyncHandshakeStress class with 9 tests (4 named + 6 parametric) that verify data integrity when mutations occur during the sync handshake. These cover the scenario from jupyter-ai-contrib#197 where an AI agent rapidly mutates a document while a second browser tab is connecting: - test_mutations_before_handshake_not_lost: 20 mutations while desynced - test_mutations_during_handshake_await: mutations during SS2 reply wait - test_no_exception_during_concurrent_handshakes: 5 clients + 50 mutations - test_concurrent_mutations_stress: parametric 2/5 clients x 10/50/100 mutations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
af4046a to
80d09b7
Compare
Collaborator
|
Rebased PR to run CI against #218. |
Collaborator
|
CI passes, merging. Thank you for adding these tests! |
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
TestSyncHandshakeStressclass totest_yroom_sync.pywith 9 tests (4 named + 6 parametric via@pytest.mark.parametrize)FakeWebSocketpattern from Fix content duplication on reconnection #215Tests
test_mutations_before_handshake_not_losttest_mutations_during_handshake_awaittest_no_exception_during_concurrent_handshakestest_concurrent_mutations_stress[N-M]Test plan
pytest jupyter_server_documents/tests/test_yroom_sync.py -xvs) — 9 existing + 9 newRelated