Repository navigation
Make the bridge screen tests wait for saves, not for time - #16
Merged
Merged
Conversation
Three widget tests fail on slower runners (Linux arm64, Windows x64). Their settle helper waited a fixed time. Saving a pairing or a host writes a file and runs chmod as a separate process, which needs both real event-loop time and timers on the test's fake clock, so on a slow runner the save had not finished when the test moved on. The helper now waits until no store call is running and no progress indicator is showing. Tracked subclasses of the real stores count the calls still in flight. No assertion changed and nothing is skipped. Each of the three tests passed 20 of 20 runs, and 10 of 10 pinned to one busy core.
The Flatpak job updates the GNOME SDK that ships inside the build container. On some hosted runner images that update stops with "Invalid cross-device link" and the builder crashes, because the installation lives in the image and its directories cannot be renamed there. Copy the installation into the container's writable layer before the build, so the update works whichever runner the job lands on.
The outbound stream's failure was swallowed with catchError and a handler that returns nothing. The socket's future carries its own type at run time, so that handler was refused and the failure surfaced as an uncaught ArgumentError whenever a peer left before its reply was written. Handle it with a typed then/onError instead.
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.
Why
mainfails on Linux arm64 and Windows x64 since 1.6.0 was merged, andthe same failures block #13 and #14. Three widget tests are the cause:
bridge_one_click_test.dart: "leaves a bridge that was already onalone" and "starts from what is shared, and Save writes the ticked
set"
ai_bridge_screens_test.dart: "a Windows path with spaces makes validJSON"
Their
settlehelper waited a fixed time. Saving a pairing or a hostwrites a file and runs
chmodas a separate process, which needs bothreal event-loop time and timers on the test's fake clock. On a slow
runner the save had not finished when the test moved on.
What changes
Tests only; nothing under
lib/.test/support/settle.dart:settleWhileturns both event loops andadvances the fake clock until nothing is busy for two turns in a row,
with a 30 second real-time limit.
test/support/tracked_stores.dart: subclasses of the realHostStore,BridgeClientStoreandBridgeAuditLogthat count thecalls still running.
settlewaits until no store call isrunning and no progress indicator is showing.
No assertion changed, nothing is skipped, and no fixed delay was added.
Evidence
Each of the three tests passed 20 of 20 runs, and 10 of 10 pinned to one
busy core at the lowest priority. The same loops were not run against
the old helper here; the proof that it fails is CI's own runs.
Local CI on a clean checkout passed.
Order
Merging this first turns
maingreen. #13, #14 and #15 can then bere-run. #15 already contains this change.