test(display): de-flake the dock harness re-dock assertion (#154)
All checks were successful
Check / eval (push) Successful in 4m16s
All checks were successful
Check / eval (push) Successful in 4m16s
tools/monitor-fallback.nix flaked at the #148 reload-mid-dock step: after a lid-closed `hyprctl reload` re-lights the disabled Virtual-1 panel, the watcher's enforce_dock_intent re-disables it — but only on the loop's 1s idle tick, because re-enabling an existing connector emits no `monitoradded` and the chatty IPC events `continue` past reconcile. Under this softGL VM's load (swaync crash-loops against the absent Vulkan device) that idle tick is starved, so the re-dock lands ~15-20s out — right on the old timeout=15. An instrumented run confirmed the mechanism is correct: dockMode=true is read, `action=re-dock` fires, the panel is re-disabled (it just missed the bound). Fix is the bound, not the watcher: 15s → 45s, in line with the test's own 20-30s waits. Harness now green end-to-end (~61s). Not a product bug and independent of the #150 extraction (the built transition/keyboard tools have byte-identical store paths across it). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -140,8 +140,15 @@ pkgs.testers.runNixOSTest {
|
||||
# re-dock action.
|
||||
machine.succeed("printf 'state: closed\\n' > /run/nomarchy-test-lid-state")
|
||||
machine.succeed(hy + "reload'")
|
||||
# A reload re-lights the *already-present* (disabled) Virtual-1 connector,
|
||||
# which emits no `monitoradded` — so the watcher only re-disables it on its
|
||||
# 1s idle tick (chatty IPC events `continue` past reconcile). Under this
|
||||
# softGL VM's load (swaync crash-loops on the absent Vulkan device, see the
|
||||
# journal) that idle tick is badly starved and the re-dock lands ~15-20s
|
||||
# out — a real, prompt re-dock on hardware, but right on the old 15s bound,
|
||||
# so this flaked. Bounded generously, in line with the 20-30s waits above.
|
||||
machine.wait_until_succeeds(
|
||||
hy + "-j monitors' | jq -e 'all(.[]; .name != \"Virtual-1\")'", timeout=15
|
||||
hy + "-j monitors' | jq -e 'all(.[]; .name != \"Virtual-1\")'", timeout=45
|
||||
)
|
||||
machine.succeed("journalctl -t nomarchy-display-watch | grep -q 'action=re-dock'")
|
||||
print("reload-mid-dock: panel re-disabled by enforce_dock_intent; re-dock logged (#148)")
|
||||
|
||||
Reference in New Issue
Block a user