From: Matus Fabian Date: Fri, 1 Aug 2025 10:13:44 +0000 (-0400) Subject: hs-test: PromMemLeakTest improvement X-Git-Tag: v26.02-rc0~132 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F43505%2F1;p=vpp.git 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 --- 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))