From e6605dce6d4e228a357784cf69b1abb3f0079ef1 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Wed, 25 Nov 2026 14:16:04 +0000 Subject: [PATCH] test(router): widen decision timeout test margin The server delay is 2s and the test bound is 1s. The 50ms timeout stays. --- smart_router_decision_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart_router_decision_test.go b/smart_router_decision_test.go index ae6c085..29ab7b1 100644 --- a/smart_router_decision_test.go +++ b/smart_router_decision_test.go @@ -317,7 +317,7 @@ func TestRouterDecisionSendsAuthAndPath(t *testing.T) { func TestRouterDecisionTimeout(t *testing.T) { f := newDecisionFixture(t, 3, "50ms", func(w http.ResponseWriter, r *http.Request) { select { - case <-time.After(200 * time.Millisecond): + case <-time.After(2 * time.Second): case <-r.Context().Done(): } okHandler(w, r) @@ -327,7 +327,7 @@ func TestRouterDecisionTimeout(t *testing.T) { if a.outcome != decisionTimeout { t.Fatalf("outcome %q", a.outcome) } - if el := time.Since(start); el > 150*time.Millisecond { + if el := time.Since(start); el > time.Second { t.Fatalf("took %s", el) } }