test(router): widen decision timeout test margin

The server delay is 2s and the test bound is 1s. The 50ms timeout stays.
This commit is contained in:
2026-11-25 14:16:04 +00:00
parent 21e9bc84d1
commit e6605dce6d
+2 -2
View File
@@ -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)
}
}