mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
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:
@@ -317,7 +317,7 @@ func TestRouterDecisionSendsAuthAndPath(t *testing.T) {
|
|||||||
func TestRouterDecisionTimeout(t *testing.T) {
|
func TestRouterDecisionTimeout(t *testing.T) {
|
||||||
f := newDecisionFixture(t, 3, "50ms", func(w http.ResponseWriter, r *http.Request) {
|
f := newDecisionFixture(t, 3, "50ms", func(w http.ResponseWriter, r *http.Request) {
|
||||||
select {
|
select {
|
||||||
case <-time.After(200 * time.Millisecond):
|
case <-time.After(2 * time.Second):
|
||||||
case <-r.Context().Done():
|
case <-r.Context().Done():
|
||||||
}
|
}
|
||||||
okHandler(w, r)
|
okHandler(w, r)
|
||||||
@@ -327,7 +327,7 @@ func TestRouterDecisionTimeout(t *testing.T) {
|
|||||||
if a.outcome != decisionTimeout {
|
if a.outcome != decisionTimeout {
|
||||||
t.Fatalf("outcome %q", a.outcome)
|
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)
|
t.Fatalf("took %s", el)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user