mirror of
https://github.com/coredns/coredns.git
synced 2026-08-20 23:08:28 -04:00
plugin/timeouts: add maxtcpqueries option to bound queries per TCP/TLS connection (#8376)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user