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-rerunfailures to the list of python requirements
  • fixes the test but allowing to re-run test_check_stat with a delay (using pytest-rerunfailures). This is more robust that using time.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.flaky doesn't interact well with pytest.incremental
  • this MR depends on opam-repository!98 (closed) that updates scripts/python_requirements.txt in tezos/opam-repository/
Edited by Philippe B.

Merge request reports

Loading