Repository navigation
test(zero-swift): fix the flaky theRowAJumpLandedOnIsDeleted - #192
Merged
Merged
Conversation
theRowAJumpLandedOnIsDeleted gave the delete a fixed 2 s of wall-clock time to reach the list. That takes several turns of the main actor, which the other @mainactor suites share; HardenStorageTests' busy-write tests hold it for seconds at a time (SQLite's 5 s busy timeout). When such a stall covered the window, the test woke after it and read the list before the delete had arrived: "on screen: n150". It now waits for n151 to come up, then checks it stays, as it waits for the jump before the delete. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d36c-588f-74c1-ab26-4bb389433e40 Co-authored-by: tmm <tmm@tmm.dev>
tmm
force-pushed
the
swift-virtual-jump-delete-flake
branch
from
November 13, 2026 06:55
178544f to
0208c83
Compare
tmm
marked this pull request as ready for review
November 13, 2026 06:55
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.
VirtualListViewTests.theRowAJumpLandedOnIsDeletedfailed on macOS CI at 02c6ab9 on main and on #180 withon screen: n150, and passed on rerun.Cause
The test, not ZeroVirtual. After deleting n150 it waited a fixed 2 s of wall-clock time, then checked that n151 had come up. The delete reaches the list over several turns of the main actor (poke playback, the page queries, the layout pass). The other
@MainActorsuites share the main actor, andHardenStorageTests' busy-write tests hold it for seconds at a time (SQLite's 5 s busy timeout). When a stall covered the 2 s window, the test woke after the window and read the list before the delete had reached it.Evidence:
aBusyWriteThatStillFailsAtCloseIsReported(15.3 s). Running the two together on a Mac stalls the test's main actor for 10.9 s.on screen: n150). The fixed test passes with stalls of 2.5 s, 5 s and 15 s.Fix
The test now waits for n151 to come up, then checks it stays there. This is how the test already waits for the jump before the delete. It is not a longer timeout: it no longer depends on how long the main actor is busy. It still catches a regression: with the deleted-row reanchor broken, it fails with
on screen: n070.Stability (Mac, Xcode 26.6 / Swift 6.3.3, as CI)
HardenStorageTests' busy-write tests: 25 passed.Test-only change, so no changeset.