We are using connection pools in our exporter integration tests. As these connection pools use connections with keep-alive, the guess is that the server has connections in TIME_WAIT for a period of time when it shuts down. Immediately starting the server (in consecutive tests) results in bind-address in use error
We are running to 2 possibly flakey tests back to back (the first one unrelating and the second one shortly relating with COS right after)
Solution
Use requests.get(stream=False) instead of using connection pools
Split the 2 tests into separate files so that they are part of separate groups and run separately
Notes
Tests passed in 1 retry compared to usually higher retries
Issue
TIME_WAIT
for a period of time when it shuts down. Immediately starting the server (in consecutive tests) results inbind-address in use
errorSolution
requests.get(stream=False)
instead of using connection poolsNotes
Tests passed in 1 retry compared to usually higher retries