]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Optimize bgp-basic-functionality-topo1 test suite 6009/head
authorKuldeep Kashyap <kashyapk@vmware.com>
Mon, 16 Mar 2020 19:51:41 +0000 (19:51 +0000)
committerKuldeep Kashyap <kashyapk@vmware.com>
Mon, 16 Mar 2020 19:55:14 +0000 (19:55 +0000)
1. Used aggresive values to verify keepalive and holddown timers functionality
2. Modified variable name in lib/bgp.py

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
tests/topotests/bgp-basic-functionality-topo1/test_bgp_basic_functionality.py
tests/topotests/lib/bgp.py

index e99111d90b1a0ccb7f0ee78ab16612a9bd204532..43639a81d1658940a6acc0ed1c015a2dd71c89cd 100755 (executable)
@@ -79,6 +79,9 @@ try:
 except IOError:
     assert False, "Could not read file {}".format(jsonFile)
 
+#Global Variable
+KEEPALIVETIMER = 2
+HOLDDOWNTIMER = 6
 
 class CreateTopo(Topo):
     """
@@ -292,8 +295,8 @@ def test_bgp_timers_functionality(request):
                                 "r2": {
                                     "dest_link":{
                                         "r1": {
-                                            "keepalivetimer": 60,
-                                            "holddowntimer": 180,
+                                            "keepalivetimer": KEEPALIVETIMER,
+                                            "holddowntimer": HOLDDOWNTIMER
                                         }
                                     }
                                 }
@@ -319,8 +322,6 @@ def test_bgp_timers_functionality(request):
     write_test_footer(tc_name)
 
 
-
-
 def test_static_routes(request):
     """ Test to create and verify static routes. """
 
index f3c17be684d27208f2ac394f76c103536434ba0a..997b72d691406a371bad40412463c1225fe76b2f 100644 (file)
@@ -382,8 +382,8 @@ def __create_bgp_neighbor(topo, input_dict, router, addr_type, add_neigh=True):
 
             disable_connected = peer.setdefault("disable_connected_check",
                                                 False)
-            keep_alive = peer.setdefault("keep_alive", 60)
-            hold_down = peer.setdefault("hold_down", 180)
+            keep_alive = peer.setdefault("keepalivetimer", 60)
+            hold_down = peer.setdefault("holddowntimer", 180)
             password = peer.setdefault("password", None)
             max_hop_limit = peer.setdefault("ebgp_multihop", 1)