Tests: Add e2e tests for RTC collaboration under network latency - #50
Draft
pkevan wants to merge 1 commit into
Draft
Tests: Add e2e tests for RTC collaboration under network latency#50pkevan wants to merge 1 commit into
pkevan wants to merge 1 commit into
Conversation
Add 10 end-to-end tests that simulate asymmetric network latency between two collaborating users (800ms delay on User B wp-sync polling via Playwright route interception). Tests cover: - Traffic capture proving latency injection is measurable - Concurrent edits resolving to identical CRDT state - Interleaved block inserts with no data loss - CRDT document persistence after save + reload - Stress: 10 rounds of rapid alternating inserts (20 blocks) - Stress: simultaneous burst of 8 blocks per user (16 total) - Stress: mixed block types (headings, lists, quotes) + attribute changes - Stress: block deletion + insertion convergence - Stress: concurrent edits then save/reload data integrity - Request volume: high-latency user does not flood the server
|
Size Change: 0 B Total Size: 7.73 MB ℹ️ View Unchanged
|
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
Adds 10 end-to-end Playwright tests that simulate asymmetric network latency between two collaborating users editing the same post with Real-time Collaboration enabled.
User A has a normal connection. User B has 800ms of artificial delay injected on all
wp-syncpolling requests via Playwrightpage.route()+route.fetch()+setTimeout. This creates a realistic scenario where one user CRDT updates arrive late and must be merged with the other user newer state.Tests
Local results
All 10 tests pass consistently (20/20 across --repeat-each=2, ~11s per test).
Test plan