Skip to content

Commit b2278fb

Browse files
saiarcot895AharonMalkin
authored andcommitted
lag_test: Add check to verify that an initial LACP packet was received (sonic-net#9343)
In the LacpTimingTest class, when getting the initial LACP packet, first check to see that a packet was captured before trying to convert the timestamp value of the tuple to a float. Otherwise, there'll be an error about an invalid argument to float. This doesn't necessarily prevent an error from being thrown, it just makes it a more graceful/expected failure. Signed-off-by: Saikrishna Arcot <[email protected]>
1 parent edf39b4 commit b2278fb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ansible/roles/test/files/acstests/lag_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def getMedianInterval(self, masked_exp_pkt):
9797
# Verify two LACP packets.
9898
(rcv_device, rcv_port, rcv_pkt, last_pkt_time) = self.dataplane.poll(
9999
port_number=self.exp_iface, timeout=self.timeout, exp_pkt=masked_exp_pkt)
100+
self.assertTrue(rcv_pkt is not None, "Failed to receive initial LACP packet\n")
100101
last_pkt_time = round(float(last_pkt_time), 2)
101102

102103
for i in range(0, self.interval_count):

0 commit comments

Comments
 (0)