cronos icon indicating copy to clipboard operation
cronos copied to clipboard

The integration test is not smart enough to detect used ports

Open elecming opened this issue 3 years ago • 2 comments
trafficstars

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.

elecming avatar Nov 24 '21 09:11 elecming

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.

yihuang avatar Dec 03 '21 04:12 yihuang

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

elecming avatar Dec 03 '21 04:12 elecming