MCPcopy Create free account
hub / github.com/FDio/vpp / test_modify_detect_mult

Method test_modify_detect_mult

test/test_bfd.py:1431–1452  ·  view source on GitHub ↗

modify detect multiplier

(self)

Source from the content-addressed store, hash-verified

1429 verify_event(self, e, expected_state=BFDState.down)
1430
1431 def test_modify_detect_mult(self):
1432 """modify detect multiplier"""
1433 bfd_session_up(self)
1434 p = wait_for_bfd_packet(self)
1435 self.vpp_session.modify_parameters(detect_mult=1)
1436 p = wait_for_bfd_packet(self, pcap_time_min=time.time() - self.vpp_clock_offset)
1437 self.assert_equal(
1438 self.vpp_session.detect_mult, p[BFD].detect_mult, "detect mult"
1439 )
1440 # poll bit must not be set
1441 self.assertNotIn(
1442 "P", p.sprintf("%BFD.flags%"), "Poll bit not set in BFD packet"
1443 )
1444 self.vpp_session.modify_parameters(detect_mult=10)
1445 p = wait_for_bfd_packet(self, pcap_time_min=time.time() - self.vpp_clock_offset)
1446 self.assert_equal(
1447 self.vpp_session.detect_mult, p[BFD].detect_mult, "detect mult"
1448 )
1449 # poll bit must not be set
1450 self.assertNotIn(
1451 "P", p.sprintf("%BFD.flags%"), "Poll bit not set in BFD packet"
1452 )
1453
1454 def test_queued_poll(self):
1455 """test poll sequence queueing"""

Callers

nothing calls this directly

Calls 4

bfd_session_upFunction · 0.85
wait_for_bfd_packetFunction · 0.85
modify_parametersMethod · 0.80
assert_equalMethod · 0.45

Tested by

no test coverage detected