From 19d7009510542c7d6eb0d317831a600a7ae02303 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Mon, 19 Oct 2026 22:30:34 +0100 Subject: [PATCH] stage: widen the timeout-reset test deadline The successful retry in TestDefaultRetriesAndTimeoutResetEachAttempt was racing its own 20ms deadline when the full suite ran in parallel. Keep the two-attempt behavior and give the retry realistic headroom. --- internal/stage/budget_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/stage/budget_test.go b/internal/stage/budget_test.go index 581c8066..dee7cb51 100644 --- a/internal/stage/budget_test.go +++ b/internal/stage/budget_test.go @@ -54,7 +54,9 @@ func TestDefaultRetriesAndTimeoutResetEachAttempt(t *testing.T) { if _, err := (ModelStage{Client: client}).Run(context.Background(), def, nil); err == nil || calls != 3 { t.Fatal("default retry count wrong", calls, err) } - def.Configs["timeout"] = "20ms" + // Leave enough headroom that the successful retry is not itself racing the + // deadline when the full suite runs in parallel. + def.Configs["timeout"] = "250ms" calls = 0 client = generatorFunc(func(ctx context.Context, _ ModelConfig, _ string) (string, error) { calls++