diff options
Diffstat (limited to 'pkg/server/server_test.go')
-rw-r--r-- | pkg/server/server_test.go | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/pkg/server/server_test.go b/pkg/server/server_test.go index 804842bd..54a2dd00 100644 --- a/pkg/server/server_test.go +++ b/pkg/server/server_test.go @@ -171,8 +171,6 @@ func TestListPolicyAssignment(t *testing.T) { } func TestMonitor(test *testing.T) { - minConnectRetry = 5 - assert := assert.New(test) s := NewBgpServer() go s.Serve() @@ -222,11 +220,6 @@ func TestMonitor(test *testing.T) { RemotePort: 10179, }, }, - Timers: config.Timers{ - Config: config.TimersConfig{ - ConnectRetry: 5, - }, - }, } ch := make(chan struct{}) go t.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) { @@ -532,8 +525,6 @@ func TestFilterpathWithRejectPolicy(t *testing.T) { } func TestPeerGroup(test *testing.T) { - minConnectRetry = 5 - assert := assert.New(test) log.SetLevel(log.DebugLevel) s := NewBgpServer() @@ -553,11 +544,6 @@ func TestPeerGroup(test *testing.T) { PeerAs: 2, PeerGroupName: "g", }, - Timers: config.Timers{ - Config: config.TimersConfig{ - ConnectRetry: 5, - }, - }, } err = s.addPeerGroup(g) assert.Nil(err) @@ -572,11 +558,6 @@ func TestPeerGroup(test *testing.T) { PassiveMode: true, }, }, - Timers: config.Timers{ - Config: config.TimersConfig{ - ConnectRetry: 5, - }, - }, } configured := map[string]interface{}{ "config": map[string]interface{}{ @@ -615,11 +596,6 @@ func TestPeerGroup(test *testing.T) { RemotePort: 10179, }, }, - Timers: config.Timers{ - Config: config.TimersConfig{ - ConnectRetry: 5, - }, - }, } ch := make(chan struct{}) go t.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) { @@ -633,8 +609,6 @@ func TestPeerGroup(test *testing.T) { } func TestDynamicNeighbor(t *testing.T) { - minConnectRetry = 5 - assert := assert.New(t) log.SetLevel(log.DebugLevel) s1 := NewBgpServer() @@ -654,11 +628,6 @@ func TestDynamicNeighbor(t *testing.T) { PeerAs: 2, PeerGroupName: "g", }, - Timers: config.Timers{ - Config: config.TimersConfig{ - ConnectRetry: 5, - }, - }, } err = s1.addPeerGroup(g) assert.Nil(err) @@ -694,11 +663,6 @@ func TestDynamicNeighbor(t *testing.T) { RemotePort: 10179, }, }, - Timers: config.Timers{ - Config: config.TimersConfig{ - ConnectRetry: 5, - }, - }, } ch := make(chan struct{}) go s2.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) { @@ -712,8 +676,6 @@ func TestDynamicNeighbor(t *testing.T) { } func TestGracefulRestartTimerExpired(t *testing.T) { - minConnectRetry = 5 - assert := assert.New(t) s1 := NewBgpServer() go s1.Serve() @@ -740,7 +702,7 @@ func TestGracefulRestartTimerExpired(t *testing.T) { GracefulRestart: config.GracefulRestart{ Config: config.GracefulRestartConfig{ Enabled: true, - RestartTime: 5, + RestartTime: minConnectRetryInterval, }, }, } @@ -775,11 +737,6 @@ func TestGracefulRestartTimerExpired(t *testing.T) { RestartTime: 1, }, }, - Timers: config.Timers{ - Config: config.TimersConfig{ - ConnectRetry: 5, - }, - }, } ch := make(chan struct{}) go s2.MonitorPeer(context.Background(), &api.MonitorPeerRequest{}, func(peer *api.Peer) { @@ -893,11 +850,6 @@ 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: 5, - }, - }, } // first server to get neighbor config is passive to hopefully make handshake faster @@ -957,8 +909,6 @@ func addVrf(t *testing.T, s *BgpServer, vrfName, rdStr string, id uint32) { } func TestDoNotReactToDuplicateRTCMemberships(t *testing.T) { - minConnectRetry = 5 - ctx := context.Background() log.SetLevel(log.DebugLevel) |