From 57e87d41a867d9a2961c9e0aa2191a0c815a8b09 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Wed, 30 May 2018 11:51:29 +0900 Subject: graceful_restart_test: Assert timer not expired This patch fixes to assert the Graceful Restart time is not expired while waiting for re-establishing peer connection. Signed-off-by: IWASE Yusuke --- test/scenario_test/graceful_restart_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/scenario_test/graceful_restart_test.py b/test/scenario_test/graceful_restart_test.py index 537cf96c..2c5c2049 100644 --- a/test/scenario_test/graceful_restart_test.py +++ b/test/scenario_test/graceful_restart_test.py @@ -86,7 +86,15 @@ class GoBGPTestBase(unittest.TestCase): g1 = self.bgpds['g1'] g2 = self.bgpds['g2'] g1.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=g2) + + # Confirm the restart timer not expired. + self.assertEqual( + g2.local( + "grep 'graceful restart timer expired' %s/gobgpd.log" + " | wc -l" % (g2.SHARED_VOLUME), capture=True), + '0') time.sleep(1) + self.assertTrue(len(g2.get_global_rib('10.10.20.0/24')) == 1) self.assertTrue(len(g2.get_global_rib('10.10.10.0/24')) == 0) for d in g2.get_global_rib(): -- cgit v1.2.3