cronos
cronos copied to clipboard
The integration test is not smart enough to detect used ports
Describe the bug Now in the integration test, the fixture uses fixed network ports. If some ports are used, the integration test will lead to fail, which should be avoided, especially the test sometimes takes very long and the development would become difficult and time-consuming on troubleshooting.
To Reproduce Create any process that may use the port that any fixture will use.
Expected behavior The program should use random ports that available on the operating system.
Random ports might make more sense running tests in CI. But fixed ports do have the advantage of being predictable development, currently, some testing codes depend on that to know which port to wait. I suggest giving this issue a lower priority.
I see, it is ok to add an option to enable the random port feature to speed up test development (sometimes ports being used is annoying in test).