mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Fixed a route pooling flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user