summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/server/fsm.go2
-rw-r--r--pkg/server/server_test.go36
2 files changed, 37 insertions, 1 deletions
diff --git a/pkg/server/fsm.go b/pkg/server/fsm.go
index b037c0f5..35172bd2 100644
--- a/pkg/server/fsm.go
+++ b/pkg/server/fsm.go
@@ -36,7 +36,7 @@ import (
)
const (
- minConnectRetryInterval = 10
+ minConnectRetryInterval = 5
)
type fsmStateReasonType uint8
diff --git a/pkg/server/server_test.go b/pkg/server/server_test.go
index 3cbf53a9..34e9be1f 100644
--- a/pkg/server/server_test.go
+++ b/pkg/server/server_test.go
@@ -335,6 +335,12 @@ func TestListPathEnableFiltered(test *testing.T) {
Transport: &api.Transport{
RemotePort: 10179,
},
+ Timers: &api.Timers{
+ Config: &api.TimersConfig{
+ ConnectRetry: 1,
+ IdleHoldTimeAfterReset: 1,
+ },
+ },
}
ch := make(chan struct{})
go s.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) {
@@ -504,6 +510,12 @@ func TestMonitor(test *testing.T) {
Transport: &api.Transport{
RemotePort: 10179,
},
+ Timers: &api.Timers{
+ Config: &api.TimersConfig{
+ ConnectRetry: 1,
+ IdleHoldTimeAfterReset: 1,
+ },
+ },
}
ch := make(chan struct{})
go t.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) {
@@ -916,6 +928,12 @@ func TestPeerGroup(test *testing.T) {
RemotePort: 10179,
},
},
+ Timers: config.Timers{
+ Config: config.TimersConfig{
+ ConnectRetry: 1,
+ IdleHoldTimeAfterReset: 1,
+ },
+ },
}
ch := make(chan struct{})
go t.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) {
@@ -983,6 +1001,12 @@ func TestDynamicNeighbor(t *testing.T) {
RemotePort: 10179,
},
},
+ Timers: config.Timers{
+ Config: config.TimersConfig{
+ ConnectRetry: 1,
+ IdleHoldTimeAfterReset: 1,
+ },
+ },
}
ch := make(chan struct{})
go s2.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) {
@@ -1049,6 +1073,12 @@ func TestGracefulRestartTimerExpired(t *testing.T) {
Enabled: true,
RestartTime: 1,
},
+ Timers: &api.Timers{
+ Config: &api.TimersConfig{
+ ConnectRetry: 1,
+ IdleHoldTimeAfterReset: 1,
+ },
+ },
}
ch := make(chan struct{})
@@ -1163,6 +1193,12 @@ func peerServers(t *testing.T, ctx context.Context, servers []*BgpServer, famili
RemotePort: uint16(peer.bgpConfig.Global.Config.Port),
},
},
+ Timers: config.Timers{
+ Config: config.TimersConfig{
+ ConnectRetry: 1,
+ IdleHoldTimeAfterReset: 1,
+ },
+ },
}
// first server to get neighbor config is passive to hopefully make handshake faster