plugin/timeouts: add maxtcpqueries option to bound queries per TCP/TLS connection (#8376)

This commit is contained in:
Pujitha Paladugu
2026-08-03 16:16:43 -07:00
committed by GitHub
parent 335c8b9a33
commit 4438f6d708
10 changed files with 244 additions and 37 deletions

View File

@@ -89,3 +89,16 @@ func TestAddPluginToAllServerBlocks(t *testing.T) {
t.Fatalf("second server block has %d plugins, want 1", got)
}
}
func TestPropagateConfigParamsMaxTCPQueries(t *testing.T) {
n := 128
first := &Config{MaxTCPQueries: &n}
first.firstConfigInBlock = first
second := &Config{firstConfigInBlock: first}
propagateConfigParams([]*Config{first, second})
if second.MaxTCPQueries == nil || *second.MaxTCPQueries != n {
t.Fatalf("expected MaxTCPQueries to propagate to second config as %d, got %v", n, second.MaxTCPQueries)
}
}