HomePhabricator

[avalanche] Improvements to the getavaaddr functional test

Description

[avalanche] Improvements to the getavaaddr functional test

Summary:
The test is currently failing on macos on CI. From my investigations this might come from the machine being so slow that some previous addr messages are sent after the mocktime is moved forward, effectively preventing from further sending and causing a timeout. This is solved by forcing the network sending loop to run before the mocktime is moved, with the use of a ping message.

Because the osx maching is slow, and my personal osx dev machine is even worst, I added some trivial speed improvements to the fix as well: removing the cooldowns and reducing the quantity of nodes to the minimum. The test still needs about a minute to complete on my machine (sic) but it used to be over 3 minutes before these improvements.

Ref T1696.

Test Plan:
On Linux and MacOS:

for i in {1..20}; do ./test/functional/test_runner.py abc_p2p_getavaaddr || break; done

(Note I actually used 100 instead of 20 for the linux run).

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Maniphest Tasks: T1696

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

Details

Provenance
FabienAuthored on Feb 7 2022, 09:25
FabienPushed on Feb 7 2022, 14:25
Reviewer
Restricted Project
Differential Revision
D11002: [avalanche] Improvements to the getavaaddr functional test
Parents
rABCcc38d7188d5a: Add include for std::bind.
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task