tests: fix wireguard test case failures 09/41609/5
authorIvan Ivanets <[email protected]>
Fri, 27 Sep 2024 14:11:18 +0000 (17:11 +0300)
committerDave Wallace <[email protected]>
Tue, 1 Oct 2024 16:57:44 +0000 (16:57 +0000)
commitb2b87e481953a9b857ff0315194d43d538f31931
treec1135c0bba437062d48fbf98747bedc46aa328e5
parent38e94c3461020f77d2a3cff0511f3a727be8af1a
tests: fix wireguard test case failures

Type: test

There are random failures in the wireguard test cases that are not related to concurrency issues.
The root cause is a retry of the handshake initiation after (REKEY_TIMEOUT + JITTER) ms, where JITTER is a random value between 0 and 333 ms.

Solution: Add a filter parameter for the `send_and_expect` method of the vpptestcase.
This filter allows for excluding unexpected handshake initiation packets when the responder sends two packets (with `message_type = 1` and `message_type = 2`),while only a single packet (with `message_type = 2`) is expected.

Change-Id: I62816931fc1b85e2202f3d36eb6c2a23714644d5
Signed-off-by: Ivan Ivanets <[email protected]>
test/framework.py
test/test_wireguard.py