Ограничить дозвон и поиск имени зависимостей одной секундой

This commit is contained in:
2026-10-06 15:54:26 +03:00
parent f9850a36c4
commit bea31f3f02
4 changed files with 33 additions and 10 deletions
@@ -8,6 +8,7 @@ import (
"net"
"os"
"testing"
"time"
"github.com/jackc/pgx/v5/pgconn"
@@ -61,6 +62,9 @@ func TestPoolAppliesLimitsAndTimeouts(t *testing.T) {
if got := db.Pool.Config().MaxConns; got != 10 {
t.Fatalf("MaxConns = %d, want 10", got)
}
if got := db.Pool.Config().ConnConfig.ConnectTimeout; got != time.Second {
t.Fatalf("ConnectTimeout = %v, want 1s", got)
}
ctx := context.Background()
for setting, want := range map[string]string{
"statement_timeout": "5s",