HomePhabricator

Better port collision management for the functional tests

Description

Better port collision management for the functional tests

Summary:
On a machine with lots of CPUs, it's is very possible to generate port collision by simply running to many tests. The port computation will wrap up and collide with a test which is still running. To avoid this, we change to strategy to use port skips by range depending on the CPU count.
While at it, I also removed the global and renamed it for clarity, wrapping it into a class to make mypy happy (function attributes are not supported but class attributes are).

Test Plan:
On a 32 core machine:

./test/functional/test_runner.py

Reviewers: #bitcoin_abc, roqqit, PiRK

Reviewed By: #bitcoin_abc, roqqit, PiRK

Subscribers: PiRK

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

Details

Provenance
FabienAuthored on Wed, Feb 12, 21:49
FabienPushed on Thu, Feb 13, 09:58
Reviewer
Restricted Project
Differential Revision
D17661: Better port collision management for the functional tests
Parents
rABC8303df900cb2: Add a simplifygbt option to simplify parsing the block template for miners
Branches
Unknown
Tags
Unknown