Skip to content

Commit 79b8c5f

Browse files
committed
Simplify timeout handling to ensure finally block executes
1 parent 0550de0 commit 79b8c5f

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

.github/workflows/cross-platform-test.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -447,26 +447,13 @@ jobs:
447447
if ($task.Wait($TimeoutMs)) {
448448
return $task.Result
449449
} else {
450-
# On timeout, dump both Proxy and background pwsh stderr for debugging
450+
# On timeout, just dump Proxy stderr and throw
451451
Write-Host "=== Proxy stderr (timeout debug) ===" -ForegroundColor Red
452452
while ($process.StandardError.Peek() -ge 0) {
453453
Write-Host ([char]$process.StandardError.Read()) -NoNewline
454454
}
455455
Write-Host ""
456-
457-
Write-Host "=== Background pwsh stderr (timeout debug) ===" -ForegroundColor Red
458-
# Kill bgProcess first to flush stderr
459-
if (-not $bgProcess.HasExited) {
460-
$bgProcess.Kill()
461-
$bgProcess.WaitForExit(3000)
462-
}
463-
if ($bgStderrTask.Wait(3000)) {
464-
Write-Host $bgStderrTask.Result
465-
} else {
466-
Write-Host "(stderr read timeout)"
467-
}
468-
469-
throw "Timeout waiting for response"
456+
throw "Timeout waiting for response after $TimeoutMs ms"
470457
}
471458
}
472459

0 commit comments

Comments
 (0)