Page MenuHomePhabricator

Better port collision management for the functional tests
AcceptedPublic

Authored by Fabien on Wed, Feb 12, 22:20.

Details

Reviewers
roqqit
Group Reviewers
Restricted Project
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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avoid_port_collision
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32389
Build 64267: Build Diffbuild-clang-tidy · build-debug · build-clang · build-without-wallet · build-diff
Build 64266: arc lint + arc unit