If a port is bound but not listening, cannot bind to it anymore but the test will see the port as closed and let us use that, causing a failure. This diff fixes this potential issue by trying to bind instead of connecting.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABC666a079219ee: Fix port collision detection in functional tests
ninja check-functional
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
test/functional/test_framework/util.py | ||
---|---|---|
362 ↗ | (On Diff #38782) | Ideally we should catch more specific exceptions. Catching Exception is OK if you really don't know what the expected exeption should be. BaseException is definitely too wide (it will catch Ctrl-C KeyboardInterrupt and other stuff like this). |
380 ↗ | (On Diff #38782) | maybe use logger.info or logger.debug instead of print |