Skip to content

Commit

Permalink
Merge pull request FRRouting#14367 from donaldsharp/ospfapi_test_failure
Browse files Browse the repository at this point in the history
two test cleanups
  • Loading branch information
riw777 authored Nov 26, 2024
2 parents 0a40e04 + bf05536 commit c84a680
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/topotests/bgp_max_med_on_startup/r1/bgpd.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!
router bgp 65001
bgp max-med on-startup 5 777
bgp max-med on-startup 30 777
no bgp ebgp-requires-policy
neighbor 192.168.255.2 remote-as 65001
neighbor 192.168.255.2 timers 3 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def _bgp_has_routes(router, metric):

# Check session is established
test_func = functools.partial(_bgp_converge, router2)
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1.0)
assert result is None, "Failed bgp convergence on r2"

# Check metric has value of max-med
test_func = functools.partial(_bgp_has_routes, router2, 777)
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1.0)
assert result is None, "r2 does not receive routes with metric 777"

# Check that when the max-med timer expires, metric is updated
Expand Down
2 changes: 2 additions & 0 deletions tests/topotests/ospfapi/test_ospf_clientapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,12 @@ def _test_router_id(tgen, testbin):

step("router id: check for modified router id")
r1.vtysh_multicmd("conf t\nrouter ospf\nospf router-id 1.1.1.1")
r1.vtysh_multicmd("clear ip ospf process")
_wait_output(p, "SUCCESS: {}".format(waitlist[1]))

step("router id: check for restored router id")
r1.vtysh_multicmd("conf t\nrouter ospf\nospf router-id 1.0.0.0")
r1.vtysh_multicmd("clear ip ospf process")
_wait_output(p, "SUCCESS: {}".format(waitlist[2]))
except Exception as error:
logging.error("ERROR: %s", error)
Expand Down

0 comments on commit c84a680

Please sign in to comment.