mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 20:17:09 +00:00
fix(doctor): raise per-check timeout to 15s for chromium launch
5s could time out the headless chromium check on cold CI. Most checks finish in milliseconds, so a longer ceiling doesn't slow real failures.
This commit is contained in:
1 parent
07ae3f265d
commit
b9ac133345
1 file changed
+7
-1
@@ -128,10 +128,16 @@ func parseDoctorArgs(args []string, stderr io.Writer) (doctorOptions, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// doctorCheckTimeout bounds a single host-readiness check. Most checks (exec
|
||||||
|
// lookups, file stats, java -version) finish in milliseconds, but
|
||||||
|
// checkChromiumLaunch boots a real browser and can exceed 5s on a cold CI
|
||||||
|
// host - 15s leaves headroom without making real failures feel hung.
|
||||||
|
const doctorCheckTimeout = 15 * time.Second
|
||||||
|
|
||||||
func runDoctorChecks(ctx context.Context, checks []doctorCheck, stdout io.Writer) error {
|
func runDoctorChecks(ctx context.Context, checks []doctorCheck, stdout io.Writer) error {
|
||||||
failures := 0
|
failures := 0
|
||||||
for _, check := range checks {
|
for _, check := range checks {
|
||||||
callCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
callCtx, cancel := context.WithTimeout(ctx, doctorCheckTimeout)
|
||||||
err := check.Run(callCtx)
|
err := check.Run(callCtx)
|
||||||
cancel()
|
cancel()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user