mirror_frr/tests/topotests/lib
Christian Hopps ed776e38f6
tests: apply KISS to retry fixture
This python fixture was way too complex for what is needed.

Eliminate gratuitous options/over-engineering:

- Change from non-deterministic `wait` and `attempts` to a single
`retry_timeout` value. This is both more deterministic, as well as
what the user should actually be thinking about.

- Use a fixed 2 second pause between executing the wrapped function
rather than a bunch of arbitrary choices of 2, 3 and 4 seconds
spread all over the test code.

- Get rid of the multiple variables for determining what "Positive" and
"Negative" results are. Instead just implement what all the user code
already wants, i.e., boolean False or a str (errormsg) means
"Negative" result otherwise it's a "Positive" result.

- As part of the above the inversion logic is much more comprehensible
in the fixture code (and more correct to boot).

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-25 05:33:04 +00:00
..
test tests: please follow the style guide 2020-12-17 15:32:55 -05:00
__init__.py Move common function and class to topotest library 2018-11-27 20:22:11 -05:00
bgp.py tests: apply KISS to retry fixture 2021-06-25 05:33:04 +00:00
bgprib.py topotests: python3, rename iterkey() with key() for dictionary usage 2020-11-25 16:31:45 +00:00
common_config.py tests: apply KISS to retry fixture 2021-06-25 05:33:04 +00:00
ltemplate.py *: reformat python files 2020-10-07 17:22:26 -04:00
lutil.py tests: JSON comparison command for LabN topotests 2021-02-22 10:31:57 +01:00
mcast-tester.py topotests: new test topology for MSDP 2021-06-09 12:32:24 -03:00
ospf.py tests: apply KISS to retry fixture 2021-06-25 05:33:04 +00:00
pim.py tests: apply KISS to retry fixture 2021-06-25 05:33:04 +00:00
send_bsr_packet.py tests: Add framework support for multicast-pim-bsm-topo1 2021-01-18 18:17:06 +00:00
snmptest.py tests: Run black against tests again to clean up formatting 2021-03-01 09:18:49 -05:00
topogen.py tests: add valgrind memleaks run options and detection 2021-06-16 02:56:15 -04:00
topojson.py tests: fix create_router_ospf6 to use ospf6 instead of ospf 2021-01-26 11:19:38 +01:00
topolog.py tests: python3 compat fixes for topotests: tabs and misc 2020-09-26 15:40:00 -04:00
topotest.py tests: add valgrind memleaks run options and detection 2021-06-16 02:56:15 -04:00