mirror_frr/tests/topotests/bgp_bmp_vrf
Louis Scalbert a235dbc65b tests: fix bgp_bmp_vrf race condition
The bgp_bmp_vrf topotest is randomly failing with similar messages:

> 2024-10-24 16:59:03,037 ERROR: topo: test failed at "bgp_bmp.test_bgp_bmp/test_bmp_bgp_unicast": Checking the updated prefixes has failed ! Generated JSON diff error report:
>
> $->pre-policy->update: expected has key '172.31.0.15/32' which is not present in output

It is particularly unsuccessful when run with valgrind:

> python3 -m pytest -vvss --valgrind-leak-kinds=all --valgrind-extra --valgrind-memleaks bgp_bmp_vrf

bgp_bmp_vrf is configuring a BMP policy on r1 and then some static BGP
prefixes on r2. If for some reasons, the BGP UPDATE arrives to r1 before
the BMP configuration is operational, the UPDATE is not sent to the BMP
server and the test fails.

Pre-configure the BMP policies at startup to avoid this race condition.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
..
bmp1 tests: rework bgp_bmp_vrf 2024-10-25 14:17:17 +02:00
r1 tests: fix bgp_bmp_vrf race condition 2024-10-25 14:17:20 +02:00
r2 topotest: add bgp_bmp_vrf topotest 2024-10-11 15:14:57 +02:00
__init__.py topotest: add bgp_bmp_vrf topotest 2024-10-11 15:14:57 +02:00
test_bgp_bmp_vrf.py tests: fix bgp_bmp_vrf race condition 2024-10-25 14:17:20 +02:00