XRPLF / clio

An XRP Ledger API Server
https://xrpl.org
ISC License
57 stars 48 forks source link

Use random ports in tests #1317

Closed kuznetsss closed 2 weeks ago

kuznetsss commented 3 months ago

Currently some of our unit tests which need to start some server are using hardcoded ports. This could lead to an issue if the hardcoded port is taken by some other application.

The solution here is to make a small library using 0 port to ask operating system for a random free port. And then use the library everywhere in tests.