p2: 120s write timeout and flags after the URL
WriteTimeout 30s was cutting digest mid-flight (queue+fetch+digest) and tailscale then 502'd. 120s write, 90s handler deadline. sift fetch URL --question now parses; extra positionals error.
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.wntrmute.dev/kyle/sift/internal/auth"
|
||||
"git.wntrmute.dev/kyle/sift/internal/fetch"
|
||||
@@ -240,3 +241,11 @@ func TestJQTooLarge(t *testing.T) {
|
||||
t.Fatalf("%d %s", rec.Code, rec.Body.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestHTTPServerWriteTimeout(t *testing.T) {
|
||||
s := New("test", &guard.Guard{}, nil, nil, slog.New(slog.NewTextHandler(io.Discard, nil)))
|
||||
hs := s.HTTPServer("127.0.0.1:0")
|
||||
if hs.WriteTimeout != 120*time.Second {
|
||||
t.Fatalf("WriteTimeout %s", hs.WriteTimeout)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user