HomePhabricator

[avalanche] Make proper use of p2p_lock in avalanche tests

Description

[avalanche] Make proper use of p2p_lock in avalanche tests

Summary: The avalanche getavaaddr functional test has been flaky on CI. It appears that in some of the avalanche tests, the p2p_lock is not held properly which is a possible cause of this flakiness. The lock is required for accessing the last_message and message_count attributes of the peer object, so it requires either to lock p2p_lock or to use the P2PInterface.wait_until() method which does it already.

Test Plan:

./test/functional/test_runner.py abc_p2p_getavaaddr abc_p2p_compactproofs

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D11653

Details

Provenance
FabienAuthored on Jun 21 2022, 15:10
FabienPushed on Jun 21 2022, 17:17
Reviewer
Restricted Project
Differential Revision
D11653: [avalanche] Make proper use of p2p_lock in avalanche tests
Parents
rABC58fc5dc0aa2d: [avalanche] Deduplicate the getavaproofs response test
Branches
Unknown
Tags
Unknown