Every connection to the juju controller must also be closed, otherwise the event_loop will have connection tasks which aren't cleaned up by the async portions of websocket and python-libjuju libraries.
Whenever a new model is added, a new connection is opened
Whenever a Controller.connect() method is called, a new connection is opened.
the _add_model(...) method was opening a connection to a controller which wasn't cleaned up during the _setup_model(...) method.
Addressing https://github.com/charmed-kubernetes/pytest-operator/issues/75
Every connection to the juju controller must also be closed, otherwise the event_loop will have connection tasks which aren't cleaned up by the async portions of websocket and python-libjuju libraries.
Whenever a new model is added, a new connection is opened Whenever a
Controller.connect()
method is called, a new connection is opened.the
_add_model(...)
method was opening a connection to a controller which wasn't cleaned up during the_setup_model(...)
method.