Closed stefanpenner closed 6 years ago
@stefanpenner I've noticed that if tests fail due to taken port it often means the previous test did not finish/cleanup correctly. It sometimes help to detect a real problem with test test or with the code, so I'm not sure if this change is worth it. Also, there are some cli tests that also start the server, so if you decide to go with this direction it may be worth take a look on other ones. (one way to detect which ones start serve is by looking on console output).
@stefanpenner I've noticed that if tests fail due to taken port it often means the previous test did not finish/cleanup correctly.
This will still happen, as the scenario where this is possible is during the same test run, and we only use 1 PORT
per complete test run.
It sometimes help to detect a real problem with test test or with the code, so I'm not sure if this change is worth it.
I believe the only way cross test run leaks can happen is if we use subprocesses for anything, and we do not.
Also, there are some cli tests that also start the server,
Good catch, I will update these.
Also, there are some cli tests that also start the server, Good catch, I will update these.
Actually I do not believe they do. As the mocks don't actually call into the true server stuff. (tested by utilizing the ports used in the CLI tests, and the tests continued to pass correctly)
…eing used)