canonical / mysql-router-operator

Mysql router operator charm
https://charmhub.io/mysql-router?channel=dpe/edge
Apache License 2.0
3 stars 3 forks source link

Attempt to stabilize exporter tests in light of bind-address in use issues #154

Closed shayancanonical closed 2 months ago

shayancanonical commented 2 months ago

Counterpart of https://github.com/canonical/mysql-router-k8s-operator/pull/254

Summary

  1. Use requests.get(stream=False) to avoid open connections on the router exporter
  2. Split the two exporter tests into different files so that they end up in different integration test groups
  3. Use a much larger timeout (7mins) that the TIME_WAIT timeout (60s/1min) to see if the snap daemon (mysql-router-exporter) will restart successfully
shayancanonical commented 2 months ago

I think that there is still value in testing the exporter endpoint - I would not want to introduce a change that will break the integration with COS while the issue is being investigated. In essence, the test will still pass, just may take longer -> emulating real world behavior where a user forms a relation with COS but just takes some time to start sending metrics to COS

I think that 3mins vs 7mins is not too much of a difference to be honest. Perfectly valid in my view point