Page MenuHomePhabricator

test: fix flaky p2p_leak
ClosedPublic

Authored by PiRK on Sat, May 3, 19:54.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC248a9df83c67: test: fix flaky p2p_leak
Summary

Since D18032, peers that send any message between version and verack get disconnected.
NoVerackIdlePeer never sends a verack, and sends a ping and a getaddr right after receiving the version reply from the node. So the test should assume that this peer can get disconnected before it has the time to check it was ever connected. This is fixed by adding check_connected=False in the add_p2p_connection call.

Later in the test the no_verack_idle_peer.wait_for_verack() call also checks for the connection, and it can therefore intermittently fail as well. Make wait_for_verack() call wait_until with check_connected=False to fix this.

Test Plan

ninja check-functional

Diff Detail