Page MenuHomePhabricator

[avalanche] Improvements to the getavaaddr functional test
ClosedPublic

Authored by Fabien on Feb 7 2022, 13:09.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABCe63dbbbc2553: [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).

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Feb 7 2022, 13:09
Fabien retitled this revision from [avalanche] Improvmenets to the getavaaddr functional test to [avalanche] Improvements to the getavaaddr functional test.Feb 7 2022, 13:11

@bot build-native-osx

PiRK added a subscriber: PiRK.

On my machine the run time is down from 24s to 10s.

This revision is now accepted and ready to land.Feb 7 2022, 14:22