diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-21 16:07:32 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-21 16:31:54 +0900 |
commit | 8efeb17ba517675ace1058a178285c68fd13bb19 (patch) | |
tree | 5762f6b5d7eed8dae2221c3c8f2191412558f19a /test | |
parent | 2c388e07576a8ea1d7f661387f5a7ba44bc6f01e (diff) |
bgp_router_test: Retry assertions of RIB for stability
To improve the stability of "bgp_router_test.py", this patch fixes to
retry assertions of RIB on a Quagga router after shutting down a
neighbor.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/scenario_test/bgp_router_test.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py index 727c598e..a69aa3f7 100644 --- a/test/scenario_test/bgp_router_test.py +++ b/test/scenario_test/bgp_router_test.py @@ -321,9 +321,12 @@ class GoBGPTestBase(unittest.TestCase): self.gobgp.wait_for(expected_state=BGP_FSM_ACTIVE, peer=q3) - paths = q1.get_global_rib('20.0.0.0/24') - self.assertEqual(len(paths), 1) - self.assertIn(paths[0]['nexthop'], n_addrs) + def f(): + paths = q1.get_global_rib('20.0.0.0/24') + self.assertEqual(len(paths), 1) + self.assertIn(paths[0]['nexthop'], n_addrs) + + assert_several_times(f) g1.del_peer(q3) del self.quaggas['q3'] |