From c70464cbb2acf6f45098678f1e56be4f7c2770dd Mon Sep 17 00:00:00 2001 From: Boris Tyshkevich Date: Mon, 15 Jun 2026 22:51:08 +0200 Subject: [PATCH] =?UTF-8?q?test(embeddedch):=20raise=20default=20start=20t?= =?UTF-8?q?imeout=2060s=E2=86=92120s=20to=20de-flake=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The embedded-ClickHouse Start() intermittently timed out at 60s in CI (e.g. the v1.6.0 release build), where the suite runs `-parallel 4 -shuffle` and up to four real CH servers start concurrently on a cold runner still extracting the downloaded binary. 120s absorbs the contention; a genuinely bad config fails fast with a CH error, so this won't mask real startup failures. Co-Authored-By: Claude Opus 4.8 (1M context) --- internal/testutil/embeddedch/embeddedch.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/internal/testutil/embeddedch/embeddedch.go b/internal/testutil/embeddedch/embeddedch.go index f301277..ea78a99 100644 --- a/internal/testutil/embeddedch/embeddedch.go +++ b/internal/testutil/embeddedch/embeddedch.go @@ -82,7 +82,7 @@ func WithTCPProtocol() Option { return func(o *Options) { o.Protocol = config.TCPProtocol } } -// WithStartTimeout overrides the default 60s start timeout. +// WithStartTimeout overrides the default 120s start timeout. func WithStartTimeout(d time.Duration) Option { return func(o *Options) { o.StartTimeout = d } } @@ -105,8 +105,13 @@ func Setup(t *testing.T, opts ...Option) *config.ClickHouseConfig { } o := Options{ - Protocol: config.HTTPProtocol, - StartTimeout: 60 * time.Second, + Protocol: config.HTTPProtocol, + // 120s, not 60s: CI runs the suite with `-parallel 4 -shuffle`, so up to + // four real ClickHouse servers start concurrently on a cold runner that + // may also still be extracting the downloaded binary. 60s intermittently + // timed out at Start() (flaky release-build failures); 120s absorbs the + // contention without masking a genuine startup error (those fail fast). + StartTimeout: 120 * time.Second, } for _, fn := range opts { fn(&o)