summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2018-05-30 11:22:53 +0900
committerIWASE Yusuke <iwase.yusuke0@gmail.com>2018-05-30 11:33:02 +0900
commita9584e6eb32f669bae4d1d81e741bc89e8b65c08 (patch)
tree3f8fd71f1addb6d042835708d6dec58443e64be5 /test/scenario_test
parentb31ab93fb4af58f963e4d6b9689f8e3aa05a8ab4 (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/scenario_test')
-rw-r--r--test/scenario_test/graceful_restart_test.py3
-rw-r--r--test/scenario_test/long_lived_graceful_restart_test.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/test/scenario_test/graceful_restart_test.py b/test/scenario_test/graceful_restart_test.py
index 5d2c2b9d..537cf96c 100644
--- a/test/scenario_test/graceful_restart_test.py
+++ b/test/scenario_test/graceful_restart_test.py
@@ -29,6 +29,7 @@ from lib.base import (
BGP_FSM_IDLE,
BGP_FSM_ACTIVE,
BGP_FSM_ESTABLISHED,
+ GRACEFUL_RESTART_TIME,
)
from lib.gobgp import GoBGPContainer
@@ -124,7 +125,7 @@ class GoBGPTestBase(unittest.TestCase):
self.assertTrue(len(g3.get_global_rib('10.10.30.0/24')) == 1)
def test_06_test_restart_timer_expire(self):
- time.sleep(25)
+ time.sleep(GRACEFUL_RESTART_TIME + 5)
g2 = self.bgpds['g2']
self.assertTrue(len(g2.get_global_rib()) == 0)
diff --git a/test/scenario_test/long_lived_graceful_restart_test.py b/test/scenario_test/long_lived_graceful_restart_test.py
index 0a42afab..44f4a45b 100644
--- a/test/scenario_test/long_lived_graceful_restart_test.py
+++ b/test/scenario_test/long_lived_graceful_restart_test.py
@@ -29,6 +29,7 @@ from lib import base
from lib.base import (
BGP_FSM_ACTIVE,
BGP_FSM_ESTABLISHED,
+ LONG_LIVED_GRACEFUL_RESTART_TIME,
)
from lib.gobgp import GoBGPContainer
@@ -156,7 +157,7 @@ class GoBGPTestBase(unittest.TestCase):
self.assertTrue(g2.asn in rib[0]['paths'][0]['aspath'])
def test_05_llgr_restart_timer_expire(self):
- time.sleep(35)
+ time.sleep(LONG_LIVED_GRACEFUL_RESTART_TIME + 5)
g3 = self.bgpds['g3']
rib = g3.get_global_rib('10.10.0.0/24')
self.assertTrue(len(rib) == 0)