WIP: Tests/python: fix flaky test with pytest.rerun
test_p2p.py was failing spuriously, most likely due to the maintenance process which is triggered non-deterministically. See https://gitlab.com/nomadic-labs/tezos/-/issues/177
This MR
- add
pytest-rerunfailuresto the list of python requirements - fixes the test but allowing to re-run
test_check_statwith a delay (usingpytest-rerunfailures). This is more robust that usingtime.sleep
Note: we already use some ad-hoc retry mechanism in utility functions (e.g. utils.check_protocol).
Using pytest-rerunfailures provides a more systematic way of doing the same thing.
WIP:
- It seems
pytest.mark.flakydoesn't interact well withpytest.incremental - this MR depends on opam-repository!98 (closed) that updates
scripts/python_requirements.txtintezos/opam-repository/
Edited by Philippe B.