From 93974e281e7f99309af259c615f7068dee600114 Mon Sep 17 00:00:00 2001 From: Adrian Villin Date: Thu, 30 May 2024 06:10:59 -0400 Subject: hs-test: set longer timeouts while debugging Type: test Change-Id: I87baba7efa36dd40f086523b35bc6d3b0a26a1b5 Signed-off-by: Adrian Villin --- extras/hs-test/vppinstance.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'extras/hs-test/vppinstance.go') diff --git a/extras/hs-test/vppinstance.go b/extras/hs-test/vppinstance.go index 3276c2dd9ae..8a92776894c 100644 --- a/extras/hs-test/vppinstance.go +++ b/extras/hs-test/vppinstance.go @@ -108,6 +108,7 @@ func (vpp *VppInstance) getEtcDir() string { } func (vpp *VppInstance) start() error { + maxReconnectAttempts := 3 // Replace default logger in govpp with our own govppLogger := logrus.New() govppLogger.SetOutput(io.MultiWriter(vpp.getSuite().logger.Writer(), GinkgoWriter)) @@ -142,6 +143,8 @@ func (vpp *VppInstance) start() error { vpp.getSuite().log("starting vpp") if *isVppDebug { + // default = 3; VPP will timeout while debugging if there are not enough attempts + maxReconnectAttempts = 5000 sig := make(chan os.Signal, 1) signal.Notify(sig, syscall.SIGQUIT) cont := make(chan bool, 1) @@ -166,7 +169,7 @@ func (vpp *VppInstance) start() error { sockAddress := vpp.container.getHostWorkDir() + defaultApiSocketFilePath conn, connEv, err := govpp.AsyncConnect( sockAddress, - core.DefaultMaxReconnectAttempts, + maxReconnectAttempts, core.DefaultReconnectInterval) if err != nil { vpp.getSuite().log("async connect error: " + fmt.Sprint(err)) @@ -184,7 +187,7 @@ func (vpp *VppInstance) start() error { context.Background(), core.WithRequestSize(50), core.WithReplySize(50), - core.WithReplyTimeout(time.Second*10)) + core.WithReplyTimeout(time.Second*5)) if err != nil { vpp.getSuite().log("creating stream failed: " + fmt.Sprint(err)) return err -- cgit 1.2.3-korg