Repository navigation
Run random schedules of edits, lost answers and teammate changes - #554
Merged
Merged
Conversation
One user edits a page and its strategy's map and theme while the network fails under them and a teammate edits too, in an order drawn from a seed. Once everything is sent and read back, the canvas must show what the server holds, the user's last edit to each thing must be there unless they were asked about it, and a teammate's edit to something the user left alone must still be there. 200 seeds run by default. SYNC_SEEDS runs more, or replays named seeds.
Pre-merge checks:
|
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.
Test only, nothing on screen. What it catches:
Why
The sync tests are one scenario per bug: each was written after someone found the bug. #550 and #551 fixed four bugs nobody had a scenario for, and this test found three of them (a lost item edit, a theme change overwriting a teammate's map, and a regression in the first version of that fix). It is here so the next one is found before a user does.
What it does
One group,
random schedules, instrategy_page_session_provider_test.dart. It uses the file's existing harness: the real page session, the real op queue and outbox, and_FakeServer.From a seed it draws 30 steps out of: the user changes the map or theme, moves or retypes one of two texts; a teammate changes the map or retypes a third text; the next answer is lost; the connection drops or returns; the live read arrives; the pointer goes down or up; save; send. Then it goes online, lets everything send, and reads the server back. If the user is being asked about refused work, it takes the cloud's version.
It then requires:
A failure prints the seed, every step, the canvas, queue and server after each settle round, and every batch sent.
200 seeds run by default, about 11 s.
SYNC_SEEDS=10000runs more;SYNC_SEEDS=1907,2673replays named seeds.Limits
ci: analyze test