Merge pull request #11227 from donaldsharp/verify_not_queued

tests: Ensure routes are not queued when calling verify_rib
This commit is contained in:
Jafar Al-Gharaibeh 2022-05-20 16:03:23 -04:00 committed by GitHub
commit 8eeadd88e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -100,7 +100,7 @@ def test_bfd_connection():
test_func = partial(
topotest.router_json_cmp, router, "show bfd peers json", expected
)
_, result = topotest.run_and_expect(test_func, None, count=8, wait=0.5)
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assertmsg = '"{}" JSON output mismatches'.format(router.name)
assert result is None, assertmsg

View File

@ -144,7 +144,7 @@ def test_bfd_connection():
test_func = partial(
topotest.router_json_cmp, router, "show bfd peers json", expected
)
_, result = topotest.run_and_expect(test_func, None, count=8, wait=0.5)
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assertmsg = '"{}" JSON output mismatches'.format(router.name)
assert result is None, assertmsg

View File

@ -3245,7 +3245,7 @@ def configure_interface_mac(tgen, input_dict):
#############################################
# Verification APIs
#############################################
@retry(retry_timeout=12)
@retry(retry_timeout=40)
def verify_rib(
tgen,
addr_type,
@ -3383,6 +3383,10 @@ def verify_rib(
st_found = True
found_routes.append(st_rt)
if "queued" in rib_routes_json[st_rt][0]:
errormsg = "Route {} is queued\n".format(st_rt)
return errormsg
if fib and next_hop:
if type(next_hop) is not list:
next_hop = [next_hop]
@ -3607,6 +3611,10 @@ def verify_rib(
st_found = True
found_routes.append(st_rt)
if "queued" in rib_routes_json[st_rt][0]:
errormsg = "Route {} is queued\n".format(st_rt)
return errormsg
if next_hop:
if type(next_hop) is not list:
next_hop = [next_hop]