import (
"testing"
+ "time"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
+var suiteTimeout time.Duration
+
func TestHst(t *testing.T) {
+ if *isVppDebug {
+ // 30 minute timeout so that the framework won't timeout while debugging
+ suiteTimeout = time.Minute * 30
+ } else {
+ suiteTimeout = time.Minute * 5
+ }
RegisterFailHandler(Fail)
RunSpecs(t, "HST")
}
"reflect"
"runtime"
"strings"
- "time"
. "github.com/onsi/ginkgo/v2"
)
It(testName, func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
It(testName, Label("SOLO"), func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
"reflect"
"runtime"
"strings"
- "time"
. "github.com/onsi/ginkgo/v2"
)
It(testName, func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
It(testName, Label("SOLO"), func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
"reflect"
"runtime"
"strings"
- "time"
. "github.com/onsi/ginkgo/v2"
)
It(testName, func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
It(testName, Label("SOLO"), func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
It(testName, func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
It(testName, Label("SOLO"), func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
It(testName, func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
It(testName, Label("SOLO"), func(ctx SpecContext) {
s.log(testName + ": BEGIN")
test(&s)
- }, SpecTimeout(time.Minute*5))
+ }, SpecTimeout(suiteTimeout))
}
})
}
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))
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)
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))
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