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).
Details
Details
- Reviewers
roqqit PiRK - Group Reviewers
Restricted Project - Commits
- rABC87480fe74d5d: Better port collision management for the functional tests
On a 32 core machine:
./test/functional/test_runner.py
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- avoid_port_collision
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 32389 Build 64267: Build Diff build-clang-tidy · build-debug · build-clang · build-without-wallet · build-diff Build 64266: arc lint + arc unit
Event Timeline
test/functional/test_framework/util.py | ||
---|---|---|
336 | That a python 3.10 union syntax https://peps.python.org/pep-0604/ | |
378 | but as of python 3.9 you can now use dict[PortName, int] https://peps.python.org/pep-0585/ |