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.
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.