aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/vppinstance.go
diff options
context:
space:
mode:
authorAdrian Villin <avillin@cisco.com>2024-05-30 06:10:59 -0400
committerFlorin Coras <florin.coras@gmail.com>2024-05-30 15:59:01 +0000
commit93974e281e7f99309af259c615f7068dee600114 (patch)
treefcc533b653259bdeb9d2c3c23f914aa559729650 /extras/hs-test/vppinstance.go
parentb9464cde7d3288f8feeeaf945ce933b276f07d82 (diff)
hs-test: set longer timeouts while debugging
Type: test Change-Id: I87baba7efa36dd40f086523b35bc6d3b0a26a1b5 Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test/vppinstance.go')
-rw-r--r--extras/hs-test/vppinstance.go7
1 files changed, 5 insertions, 2 deletions
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