mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-09-07 15:07:17 +00:00
Raise chromedp websocket-URL read timeout to reduce CI flakiness
The default 20s wsURLReadTimeout in chromedp's exec allocator can be too tight on a loaded shared CI runner spawning headless Chrome, surfacing as an unrelated "websocket url timeout reached" test failure. Raise it to 45s and widen the per-test context to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a3d4f0701b
commit
1752e7c79d
@@ -33,6 +33,12 @@ func newHeadlessChromeContext(t *testing.T) context.Context {
|
||||
// permissions Chrome's sandbox needs; harmless to also set
|
||||
// locally.
|
||||
chromedp.Flag("no-sandbox", true),
|
||||
// chromedp's default is 20s; a loaded shared CI runner can be
|
||||
// slower than that to fork/exec Chrome and print its DevTools
|
||||
// websocket URL, which otherwise surfaces as a flaky "websocket
|
||||
// url timeout reached" test failure unrelated to the page under
|
||||
// test.
|
||||
chromedp.WSURLReadTimeout(45*time.Second),
|
||||
)...,
|
||||
)
|
||||
t.Cleanup(cancelAlloc)
|
||||
@@ -40,7 +46,7 @@ func newHeadlessChromeContext(t *testing.T) context.Context {
|
||||
ctx, cancelCtx := chromedp.NewContext(allocCtx)
|
||||
t.Cleanup(cancelCtx)
|
||||
|
||||
ctx, cancelTimeout := context.WithTimeout(ctx, 30*time.Second)
|
||||
ctx, cancelTimeout := context.WithTimeout(ctx, 60*time.Second)
|
||||
t.Cleanup(cancelTimeout)
|
||||
|
||||
return ctx
|
||||
|
||||
Reference in New Issue
Block a user