Fixed a route pooling flapper

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2023-08-29 14:20:36 -06:00
parent dbd2cb61da
commit 0d74453919

View File

@@ -3129,7 +3129,7 @@ func TestRoutePoolWithOlderServerConnectAndReconnect(t *testing.T) {
// We could get some, but it should settle.
checkRepeatConnect := func() {
t.Helper()
tm := time.NewTimer(2 * DEFAULT_ROUTE_CONNECT)
tm := time.NewTimer(4 * routeConnectDelay)
var last time.Time
for done := false; !done; {
select {
@@ -3139,7 +3139,7 @@ func TestRoutePoolWithOlderServerConnectAndReconnect(t *testing.T) {
done = true
}
}
if dur := time.Since(last); dur <= DEFAULT_ROUTE_CONNECT {
if dur := time.Since(last); dur <= routeConnectDelay {
t.Fatalf("Still attempted to connect %v ago", dur)
}
}