Skip to content

Commit 5cdd97e

Browse files
authored
test(windows): keep the badge tick budget off the offline health request (#5772)
1 parent 8755077 commit 5cdd97e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎tests/helpers/windows-tray-probe-lifecycle-driver.ps1‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ foreach ($fn in $definitions) {
7070
$missing = @($wanted | Where-Object { $loaded -notcontains $_ })
7171
if ($missing.Count -gt 0) { throw "tray script is missing functions: $($missing -join ', ')" }
7272

73+
# Badge scenarios assert that the UPDATE-BADGE maintenance never blocks the UI tick. The
74+
# tick also starts with the pre-existing /healthz request (Read-JsonUrl, 700 ms timeout),
75+
# which on an offline Windows runner can spend most of a second on a refused loopback
76+
# connect. That cost predates the badge and is not what these scenarios measure, so they
77+
# answer offline instantly; the Offline/Online scenarios keep the real request.
78+
if ($Scenario.StartsWith("Badge")) {
79+
function Read-JsonUrl([string]$Url) { throw "offline (badge scenario stub)" }
80+
}
81+
7382
# Production-shaped inputs (normally the script params and top-level state).
7483
$BunPath = $ChildEnginePath
7584
$CliPath = $HangChildPath

0 commit comments

Comments
 (0)