diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-30 11:22:53 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-30 11:33:02 +0900 |
commit | a9584e6eb32f669bae4d1d81e741bc89e8b65c08 (patch) | |
tree | 3f8fd71f1addb6d042835708d6dec58443e64be5 /test/lib | |
parent | b31ab93fb4af58f963e4d6b9689f8e3aa05a8ab4 (diff) |
scenario_test: Extend Graceful Restart time
The current Graceful Restart time is 20 sec, but this value is not
enough long and can be exceeded unexpectedly while waiting for
re-establishing peer connections. Then the stale paths on a receiving
router are dropped before the paths successfully synced, and some test
cases on "graceful_restart_test.py" will be passed unexpectedly.
This patch extends the Graceful Restart time to 30 sec and introduces
the constants for Graceful Restart time and Long-Lived Graceful Restart
time.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/base.py | 3 | ||||
-rw-r--r-- | test/lib/gobgp.py | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/test/lib/base.py b/test/lib/base.py index 657c9623..99a9e97c 100644 --- a/test/lib/base.py +++ b/test/lib/base.py @@ -48,6 +48,9 @@ BGP_ATTR_TYPE_CLUSTER_LIST = 10 BGP_ATTR_TYPE_MP_REACH_NLRI = 14 BGP_ATTR_TYPE_EXTENDED_COMMUNITIES = 16 +GRACEFUL_RESTART_TIME = 30 +LONG_LIVED_GRACEFUL_RESTART_TIME = 30 + FLOWSPEC_NAME_TO_TYPE = { "destination": 1, "source": 2, diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py index 3c33056b..bc1f96e9 100644 --- a/test/lib/gobgp.py +++ b/test/lib/gobgp.py @@ -30,6 +30,7 @@ import toml import yaml from lib.base import ( + community_str, wait_for_completion, BGPContainer, CmdBuffer, @@ -39,7 +40,8 @@ from lib.base import ( BGP_ATTR_TYPE_LOCAL_PREF, BGP_ATTR_TYPE_COMMUNITIES, BGP_ATTR_TYPE_MP_REACH_NLRI, - community_str, + GRACEFUL_RESTART_TIME, + LONG_LIVED_GRACEFUL_RESTART_TIME, ) @@ -445,7 +447,7 @@ class GoBGPContainer(BGPContainer): v['prefix-limit'] = {'config': {'max-prefixes': info['prefix_limit'], 'shutdown-threshold-pct': 80}} if info['graceful_restart'] is not None: - n['graceful-restart'] = {'config': {'enabled': True, 'restart-time': 20}} + n['graceful-restart'] = {'config': {'enabled': True, 'restart-time': GRACEFUL_RESTART_TIME}} for afi_safi in afi_safi_list: afi_safi['mp-graceful-restart'] = {'config': {'enabled': True}} @@ -453,7 +455,7 @@ class GoBGPContainer(BGPContainer): n['graceful-restart']['config']['restart-time'] = 1 n['graceful-restart']['config']['long-lived-enabled'] = True for afi_safi in afi_safi_list: - afi_safi['long-lived-graceful-restart'] = {'config': {'enabled': True, 'restart-time': 30}} + afi_safi['long-lived-graceful-restart'] = {'config': {'enabled': True, 'restart-time': LONG_LIVED_GRACEFUL_RESTART_TIME}} if info['is_rr_client']: cluster_id = self.router_id |