diff options
Diffstat (limited to 'test/scenario_test/route_server_softreset_test.py')
-rw-r--r-- | test/scenario_test/route_server_softreset_test.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/scenario_test/route_server_softreset_test.py b/test/scenario_test/route_server_softreset_test.py index 23f646eb..90096be0 100644 --- a/test/scenario_test/route_server_softreset_test.py +++ b/test/scenario_test/route_server_softreset_test.py @@ -95,7 +95,8 @@ class GoBGPTestBase(unittest.TestCase): time.sleep(1) - num = g2.get_neighbor(g1)['state']['messages']['received']['update'] + num = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0) + num = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0) ps0 = {'prefix-set-name': 'ps0', 'prefix-list': [p1]} g1.set_prefix_set(ps0) @@ -105,14 +106,14 @@ class GoBGPTestBase(unittest.TestCase): time.sleep(1) - num2 = g2.get_neighbor(g1)['state']['messages']['received']['update'] + num2 = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0) self.assertTrue((num + 1) == num2) g3.softreset(g1, type='out') time.sleep(1) - num3 = g2.get_neighbor(g1)['state']['messages']['received']['update'] + num3 = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0) self.assertTrue(num2 == num3) def test_03_softresetin_test2(self): @@ -122,13 +123,13 @@ class GoBGPTestBase(unittest.TestCase): g2.add_route('10.0.10.0/24') time.sleep(1) - num = g2.get_neighbor(g1)['state']['messages']['received']['update'] + num = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0) time.sleep(3) g1.local('gobgp n all softresetin') time.sleep(3) - num1 = g2.get_neighbor(g1)['state']['messages']['received']['update'] + num1 = g2.get_neighbor(g1)['state']['messages']['received'].get('update', 0) self.assertTrue(num == num1) |