From 1752e7c79d8e816f67c19f785471284cf63e8a83 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Thu, 3 Sep 2026 18:59:53 +0200 Subject: [PATCH] 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 --- pkg/service/soundtouchweb/browser_compatibility_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/service/soundtouchweb/browser_compatibility_test.go b/pkg/service/soundtouchweb/browser_compatibility_test.go index 5ea05f5b..860b78fc 100644 --- a/pkg/service/soundtouchweb/browser_compatibility_test.go +++ b/pkg/service/soundtouchweb/browser_compatibility_test.go @@ -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