From 467ce9c6cd357d9c24159579eea3608173c1493b Mon Sep 17 00:00:00 2001 From: shwetha-s-poojary Date: Wed, 18 Mar 2026 15:25:21 +0530 Subject: [PATCH] Fix TestGetConntrackMax to align with capped conntrack max values --- pkg/proxy/conntrack/sysctls_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/proxy/conntrack/sysctls_test.go b/pkg/proxy/conntrack/sysctls_test.go index a7b487225bf..f7bbc53fa02 100644 --- a/pkg/proxy/conntrack/sysctls_test.go +++ b/pkg/proxy/conntrack/sysctls_test.go @@ -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