forked from Mirror/frr
tests: Fix wait times in test_ospf6_gr_topo1 topotest
Increase wait times to at least the minimum wait time accepted by topotest.run_and_expect(). Also change poll interval to 1s, no point in doings this more frequently. Finally, slightly improve the topology diagram to also include area numbers. Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
This commit is contained in:
parent
0db0e7fbd7
commit
b73e3ae69d
|
@ -17,14 +17,14 @@ test_ospf6_gr_topo1.py:
|
||||||
| 1.1.1.1 |
|
| 1.1.1.1 |
|
||||||
+---------+
|
+---------+
|
||||||
|eth-rt2
|
|eth-rt2
|
||||||
|
|
|area 1
|
||||||
|eth-rt1
|
|eth-rt1
|
||||||
+---------+
|
+---------+
|
||||||
| RT2 |
|
| RT2 |
|
||||||
| 2.2.2.2 |
|
| 2.2.2.2 |
|
||||||
+---------+
|
+---------+
|
||||||
|eth-rt3
|
|eth-rt3
|
||||||
|
|
|area 0
|
||||||
|eth-rt2
|
|eth-rt2
|
||||||
+---------+
|
+---------+
|
||||||
| RT3 |
|
| RT3 |
|
||||||
|
@ -33,14 +33,14 @@ test_ospf6_gr_topo1.py:
|
||||||
eth-rt4| |eth-rt6
|
eth-rt4| |eth-rt6
|
||||||
| |
|
| |
|
||||||
+---------+ +--------+
|
+---------+ +--------+
|
||||||
| |
|
|area 0 |area 0
|
||||||
|eth-rt3 |eth-rt3
|
|eth-rt3 |eth-rt3
|
||||||
+---------+ +---------+
|
+---------+ +---------+
|
||||||
| RT4 | | RT6 |
|
| RT4 | | RT6 |
|
||||||
| 4.4.4.4 | | 6.6.6.6 |
|
| 4.4.4.4 | | 6.6.6.6 |
|
||||||
+---------+ +---------+
|
+---------+ +---------+
|
||||||
|eth-rt5 |eth-rt7
|
|eth-rt5 |eth-rt7
|
||||||
| |
|
|area 2 |area 3
|
||||||
|eth-rt4 |eth-rt6
|
|eth-rt4 |eth-rt6
|
||||||
+---------+ +---------+
|
+---------+ +---------+
|
||||||
| RT5 | | RT7 |
|
| RT5 | | RT7 |
|
||||||
|
@ -153,7 +153,7 @@ def router_compare_json_output(rname, command, reference, tries):
|
||||||
expected = json.loads(open(filename).read())
|
expected = json.loads(open(filename).read())
|
||||||
|
|
||||||
test_func = partial(topotest.router_json_cmp, tgen.gears[rname], command, expected)
|
test_func = partial(topotest.router_json_cmp, tgen.gears[rname], command, expected)
|
||||||
_, diff = topotest.run_and_expect(test_func, None, count=tries, wait=0.5)
|
_, diff = topotest.run_and_expect(test_func, None, count=tries, wait=1)
|
||||||
assertmsg = '"{}" JSON output mismatches the expected result'.format(rname)
|
assertmsg = '"{}" JSON output mismatches the expected result'.format(rname)
|
||||||
assert diff is None, assertmsg
|
assert diff is None, assertmsg
|
||||||
|
|
||||||
|
@ -206,12 +206,12 @@ def check_routers(initial_convergence=False, exiting=None, restarting=None):
|
||||||
# processing it. Let's give it a few seconds to allow this to happen
|
# processing it. Let's give it a few seconds to allow this to happen
|
||||||
# under load.
|
# under load.
|
||||||
if initial_convergence == True:
|
if initial_convergence == True:
|
||||||
tries = 240
|
tries = 120
|
||||||
else:
|
else:
|
||||||
if restarting != None:
|
if restarting != None:
|
||||||
tries = 40
|
tries = 20
|
||||||
else:
|
else:
|
||||||
tries = 10
|
tries = 15
|
||||||
router_compare_json_output(
|
router_compare_json_output(
|
||||||
rname, "show ipv6 route ospf json", "show_ipv6_route.json", tries
|
rname, "show ipv6 route ospf json", "show_ipv6_route.json", tries
|
||||||
)
|
)
|
||||||
|
@ -219,7 +219,7 @@ def check_routers(initial_convergence=False, exiting=None, restarting=None):
|
||||||
# Check that all adjacencies are up and running (except when there's
|
# Check that all adjacencies are up and running (except when there's
|
||||||
# an OSPF instance that is shutting down).
|
# an OSPF instance that is shutting down).
|
||||||
if exiting == None:
|
if exiting == None:
|
||||||
tries = 240
|
tries = 120
|
||||||
router_compare_json_output(
|
router_compare_json_output(
|
||||||
rname,
|
rname,
|
||||||
"show ipv6 ospf neighbor json",
|
"show ipv6 ospf neighbor json",
|
||||||
|
@ -231,9 +231,9 @@ def check_routers(initial_convergence=False, exiting=None, restarting=None):
|
||||||
# In the restarting router, wait up to one minute for the LSDB to converge.
|
# In the restarting router, wait up to one minute for the LSDB to converge.
|
||||||
if exiting != rname:
|
if exiting != rname:
|
||||||
if initial_convergence == True or restarting == rname:
|
if initial_convergence == True or restarting == rname:
|
||||||
tries = 240
|
tries = 120
|
||||||
else:
|
else:
|
||||||
tries = 10
|
tries = 15
|
||||||
router_compare_json_output(
|
router_compare_json_output(
|
||||||
rname,
|
rname,
|
||||||
"show ipv6 ospf database json",
|
"show ipv6 ospf database json",
|
||||||
|
|
Loading…
Reference in a new issue