diff options
author | Jeff Bean <bean@uber.com> | 2018-06-23 17:55:25 -0700 |
---|---|---|
committer | Jeff Bean <bean@uber.com> | 2018-06-23 17:55:25 -0700 |
commit | bc4854ce505e2f3fe434a1ce30526f77c4d1fef4 (patch) | |
tree | c095702b3f75aea7ddb962471d8a958230cd99af /server | |
parent | fb034c3aba46e318fcbd748cef02796a05305aa2 (diff) |
timeouts on tests and fixing timeout logic on graceful restart test
Diffstat (limited to 'server')
-rw-r--r-- | server/server_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/server_test.go b/server/server_test.go index ff9bfd40..b7a03490 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -594,7 +594,7 @@ func TestGracefulRestartTimerExpired(t *testing.T) { GracefulRestart: config.GracefulRestart{ Config: config.GracefulRestartConfig{ Enabled: true, - RestartTime: 10, + RestartTime: 1, }, }, } @@ -610,7 +610,7 @@ func TestGracefulRestartTimerExpired(t *testing.T) { Port: -1, }, }) - assert.Nil(err) + require.NoError(t, err) defer s2.Stop() m := &config.Neighbor{ @@ -626,7 +626,7 @@ func TestGracefulRestartTimerExpired(t *testing.T) { GracefulRestart: config.GracefulRestart{ Config: config.GracefulRestartConfig{ Enabled: true, - RestartTime: 10, + RestartTime: 1, }, }, } @@ -658,7 +658,8 @@ func TestGracefulRestartTimerExpired(t *testing.T) { require.NoError(t, err) defer conn.Close() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*3) + // this seems to take around 22 seconds... need to address this whole thing + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() // Waiting for Graceful Restart timer expired and moving on to IDLE state. |