]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Enhance libraries to optimize test execution 6851/head
authorKuldeep Kashyap <kashyapk@vmware.com>
Thu, 24 Sep 2020 13:28:27 +0000 (13:28 +0000)
committerKuldeep Kashyap <kashyapk@vmware.com>
Thu, 12 Nov 2020 11:45:12 +0000 (11:45 +0000)
1. Enhance libraries to optimize test execution as per Donald's suggestion

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

index 72b99eeba847d8ed3db7e3e1eff03df95077e996..8427b241b76873b5dff66770f9d8389352015e3f 100644 (file)
@@ -991,7 +991,7 @@ def modify_bgp_config_when_bgpd_down(tgen, topo, input_dict):
 #############################################
 # Verification APIs
 #############################################
-@retry(attempts=3, wait=2, return_is_str=True)
+@retry(attempts=4, wait=2, return_is_str=True)
 def verify_router_id(tgen, topo, input_dict):
     """
     Running command "show ip bgp json" for DUT and reading router-id
@@ -1246,7 +1246,7 @@ def verify_bgp_convergence(tgen, topo, dut=None):
     return True
 
 
-@retry(attempts=3, wait=4, return_is_str=True)
+@retry(attempts=4, wait=4, return_is_str=True)
 def verify_bgp_community(
     tgen, addr_type, router, network, input_dict=None, vrf=None, bestpath=False
 ):
@@ -1411,7 +1411,7 @@ def modify_as_number(tgen, topo, input_dict):
     return True
 
 
-@retry(attempts=3, wait=2, return_is_str=True)
+@retry(attempts=4, wait=2, return_is_str=True)
 def verify_as_numbers(tgen, topo, input_dict):
     """
     This API is to verify AS numbers for given DUT by running
@@ -2062,7 +2062,7 @@ def verify_bgp_timers_and_functionality(tgen, topo, input_dict):
     return True
 
 
-@retry(attempts=3, wait=4, return_is_str=True)
+@retry(attempts=4, wait=4, return_is_str=True)
 def verify_bgp_attributes(
     tgen,
     addr_type,
@@ -2198,7 +2198,7 @@ def verify_bgp_attributes(
     return True
 
 
-@retry(attempts=5, wait=2, return_is_str=True)
+@retry(attempts=4, wait=2, return_is_str=True)
 def verify_best_path_as_per_bgp_attribute(
     tgen, addr_type, router, input_dict, attribute
 ):
@@ -2402,6 +2402,7 @@ def verify_best_path_as_per_bgp_attribute(
     return True
 
 
+@retry(attempts=5, wait=2, return_is_str=True)
 def verify_best_path_as_per_admin_distance(
     tgen, addr_type, router, input_dict, attribute
 ):
@@ -3303,7 +3304,7 @@ def verify_eor(tgen, topo, addr_type, input_dict, dut, peer):
     return True
 
 
-@retry(attempts=5, wait=2, return_is_str=True)
+@retry(attempts=4, wait=2, return_is_str=True)
 def verify_f_bit(tgen, topo, addr_type, input_dict, dut, peer):
     """
     This API is to verify f_bit in the BGP gr capability advertised
@@ -3569,7 +3570,7 @@ def verify_graceful_restart_timers(tgen, topo, addr_type, input_dict, dut, peer)
     return True
 
 
-@retry(attempts=5, wait=2, return_is_str=True)
+@retry(attempts=4, wait=2, return_is_str=True)
 def verify_gr_address_family(tgen, topo, addr_type, addr_family, dut):
     """
     This API is to verify gr_address_family in the BGP gr capability advertised
@@ -4060,7 +4061,7 @@ def verify_attributes_for_evpn_routes(
     return False
 
 
-@retry(attempts=6, wait=2, return_is_str=True)
+@retry(attempts=5, wait=2, return_is_str=True)
 def verify_evpn_routes(
     tgen, topo, dut, input_dict, routeType=5, EthTag=0, next_hop=None
 ):
index e42992e294a799f7c41b8ffa6120f3fbb6875ec5..9c104db3cd70f1113d484f5d5399b7d624754990 100644 (file)
@@ -2944,8 +2944,7 @@ def verify_rib(
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
     return True
 
-
-@retry(attempts=5, wait=2, return_is_str=True, initial_wait=2)
+@retry(attempts=6, wait=2, return_is_str=True)
 def verify_fib_routes(tgen, addr_type, dut, input_dict, next_hop=None):
     """
     Data will be read from input_dict or input JSON file, API will generate
@@ -3396,7 +3395,7 @@ def verify_route_maps(tgen, input_dict):
     return True
 
 
-@retry(attempts=3, wait=4, return_is_str=True)
+@retry(attempts=4, wait=4, return_is_str=True)
 def verify_bgp_community(tgen, addr_type, router, network, input_dict=None):
     """
     API to veiryf BGP large community is attached in route for any given