Ограничить дозвон и поиск имени зависимостей одной секундой
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user