From a43464a84fb44523d1aedb2c2f7ea21979438342 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Fri, 1 Aug 2025 06:13:44 -0400 Subject: [PATCH] hs-test: PromMemLeakTest improvement do warmup with same nuber of requests and sleep before main test section to prevent false positives Type: test Change-Id: Ie0ffbb27be58693f0c35c9a7ffed216ec4be1cb4 Signed-off-by: Matus Fabian --- extras/hs-test/http1_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/extras/hs-test/http1_test.go b/extras/hs-test/http1_test.go index 045109c8954..6e0f9d7a800 100644 --- a/extras/hs-test/http1_test.go +++ b/extras/hs-test/http1_test.go @@ -904,8 +904,14 @@ func PromMemLeakTest(s *Http1Suite) { s.Log(vpp.Vppctl("prom enable")) time.Sleep(time.Second * 3) - /* warmup request (FIB) */ - promReq(s, url, defaultHttpTimeout) + /* warmup requests (FIB, pool allocations) */ + for i := 0; i < 5; i++ { + time.Sleep(time.Second * 1) + promReq(s, url, defaultHttpTimeout) + } + + /* let's give it some time to clean up sessions, so pool elements can be reused and we have less noise */ + time.Sleep(time.Second * 12) vpp.EnableMemoryTrace() traces1, err := vpp.GetMemoryTrace() @@ -918,7 +924,7 @@ func PromMemLeakTest(s *Http1Suite) { } /* let's give it some time to clean up sessions */ - time.Sleep(time.Second * 5) + time.Sleep(time.Second * 12) traces2, err := vpp.GetMemoryTrace() s.AssertNil(err, fmt.Sprint(err)) -- 2.16.6