Skip to content

Commit

Permalink
Merge pull request #1151 from freyes/swift-proxy-race-bobcat
Browse files Browse the repository at this point in the history
Add tenacity retries around ring sync check [bobcat backport]
  • Loading branch information
ajkavanagh authored Oct 13, 2023
2 parents 7bd8920 + 1c4279c commit a0d6249
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions zaza/openstack/charm_tests/swift/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,15 @@ def test_904_set_weight_action_and_validate_rebalance(self):
zaza.model.wait_for_agent_status()
zaza.model.block_until_all_units_idle()

self.assertTrue(
swift_utils.is_ring_synced('swift-proxy', 'object',
self.TEST_EXPECTED_RING_HOSTS))
for attempt in tenacity.Retrying(
wait=tenacity.wait_fixed(2),
retry=tenacity.retry_if_exception_type(AssertionError),
reraise=True,
stop=tenacity.stop_after_attempt(10)):
with attempt:
self.assertTrue(
swift_utils.is_ring_synced('swift-proxy', 'object',
self.TEST_EXPECTED_RING_HOSTS))

def test_905_remove_device_action_and_validate_rebalance(self):
"""Remove device from object ring."""
Expand Down

0 comments on commit a0d6249

Please sign in to comment.