Repository navigation
test(model): wait for the hydration count before the report in the live plan - #169
Merged
Merged
Conversation
aicayzer
commented
Oct 26, 2026
aicayzer
left a comment
Contributor
Author
There was a problem hiding this comment.
Review: checks only
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
The
Livetest plan sometimes timed out when run as a whole against a test instance. One test,makesEditsLinksAndUndoesItsOwnItems, raced with the copy's own rehydration: it checked that the copy was whole before checking that a new hydration had been counted, but the copy marks itself as catching up before it counts one. The check could pass on the old, whole report while the hydration had already begun, and the next undo was then refused during the catch-up. This change reads the count first and then the source's own report, so the wait only ends once the rehydration has finished.Changes
MarfaLibraryLiveTests.swift:rehydrated(after:)waits for the hydration count to rise, then reads the source's sync report (the library's report follows it a moment later).MarfaHostLiveTests.swift: thewaiting == 2expectation in the purged-elsewhere test now reports the waiting count, connection state and problems if it fails, so a recurrence shows its state.Testing
Against the
demotest instance, the wholeLiveplan, three times:makesEditsLinksAndUndoesItsOwnItemsafter about 127 s. A diagnostic showed the hub and library phase were bothcatchingUpwhen the undo was issued. The server was idle during the wait (median request time 5 ms, slowest 1.3 s), so the cause is the test, not the server.makesEditsLinksAndUndoesItsOwnItemsand took about 295 s instead of about 400 s. One test still failed:theNameIsReadChangedAndPutBack, which returnsnotPermittedin under a second because the test instance's key for this app lacksconfig.manage(the server log showsGET /config 403). That is a test instance setting and not changed here.Not tested: the stall seen once in
editsToAnItemPurgedElsewhere…right after thedemoinstance restarted. It did not recur in more than 20 later passes, so the cause is unknown and this change does not claim to fix it; the added message is for the next occurrence. No UI test plan or app launch was run.Notes for reviewers
Tests only, so checks are enough and no code review is needed. Pull requests 98 and 127 also touch
MarfaLibraryLiveTests.swift; the edit here is a few lines in one helper.Checklist