Merge pull request #137847 from shwetha-s-poojary/fix_TestGetConntrackMax

Fix TestGetConntrackMax to align with capped conntrack max values
This commit is contained in:
Kubernetes Prow Robot
2026-03-18 20:55:03 +05:30
committed by GitHub

View File

@@ -37,6 +37,7 @@ import (
func TestGetConntrackMax(t *testing.T) {
ncores := runtime.NumCPU()
const maxLimit = 1048576
testCases := []struct {
min int32
maxPerCore int32
@@ -49,7 +50,7 @@ func TestGetConntrackMax(t *testing.T) {
{
maxPerCore: 67890, // use this if Max is 0
min: 1, // avoid 0 default
expected: 67890 * ncores,
expected: min(67890*ncores, maxLimit),
},
{
maxPerCore: 1, // ensure that Min is considered