canonical / mysql-router-k8s-operator

Mysql router operator charm for kubernetes
https://charmhub.io/mysql-router-k8s
Apache License 2.0
2 stars 6 forks source link

[DPE-4173] Miscellaneous improvements to continue stabilizing exporter integration tests #254

Closed shayancanonical closed 2 months ago

shayancanonical commented 2 months ago

Issue

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

  1. Use requests.get(stream=False) instead of using connection pools
  2. 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

shayancanonical commented 2 months ago

It is by no means a call to surrender! Plan on continuing investigating the connection in TIME_WAIT with upstream: https://github.com/rluisr/mysqlrouter_exporter/issues/67