Ensure model starts executing before the wait
There was a race before a block_until_all_units_idle() where it could blast through the check before it started removing the relation. This ensures that it waits until something happens and then waits for it to finish.
This commit is contained in:
@@ -86,6 +86,7 @@ class CinderCephMonTest(test_utils.OpenStackBaseTest):
|
||||
logging.info("Removing ceph-mon:client <-> cinder-ceph:ceph relation")
|
||||
zaza.model.remove_relation(
|
||||
"ceph-mon", "ceph-mon:client", "cinder-ceph:ceph")
|
||||
zaza.model.wait_for_agent_status()
|
||||
logging.info("Wait till model is idle ...")
|
||||
zaza.model.block_until_all_units_idle()
|
||||
|
||||
@@ -104,6 +105,7 @@ class CinderCephMonTest(test_utils.OpenStackBaseTest):
|
||||
logging.info("Restoring ceph-mon:client <-> cinder-ceph:ceph relation")
|
||||
zaza.model.add_relation(
|
||||
"ceph-mon", "ceph-mon:client", "cinder-ceph:ceph")
|
||||
zaza.model.wait_for_agent_status()
|
||||
logging.info("Wait till model is idle ...")
|
||||
zaza.model.block_until_all_units_idle()
|
||||
logging.info("... Done.")
|
||||
|
||||
Reference in New Issue
Block a user