You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gallery: TestWebInput sleeps two seconds for the page instead of waiting for it, and fails macOS CI under load #753
TestWebInput in examples/gallery/app_test.go:828-841 opens the WebView demo, waits for id:bridge, then sleeps a fixed two seconds because "the page posts where its button is as it loads", presses id:click-page and waits 10 s for text:hello from the page:
app.WaitFor("id:bridge", 10*time.Second)
// The page posts where its button is as it loads.time.Sleep(2*time.Second)
app.Press("id:click-page")
app.WaitFor("text:hello from the page", 10*time.Second)
Under load the page has not posted its button's position within those two seconds, so the trusted click lands elsewhere and the wait at line 838 fails with "nsgotest: the condition did not hold after 10s".
Why it matters
It fails the macOS Gallery (macos) job on PRs that touch nothing near it, and each failure costs a 12-minute rerun. Seen twice on 2026-11-18/19: on #673 (a command-line change) and on #739 (Android only); both passed on rerun.
Proposal
Wait for the page to report its button instead of sleeping: have the demo show something once the bridge has received the button's position (or enable id:click-page only then) and WaitFor that before pressing.
Acceptance
TestWebInput has no fixed sleep and waits for a condition the page sets once its button's position is known.
go tool nsgo test -target macos -run TestWebInput ./examples/gallery passes repeatedly while the machine is busy (for example with a parallel build running).
Activity