Skip to content

Commit

Permalink
Add retries for assertions to wait for reconcile
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Jun 11, 2024
1 parent 94c74d1 commit 0fa09cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions magnum_cluster_api/tests/functional/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from unittest import mock

import pytest
import tenacity
from magnum import objects as magnum_objects # type: ignore
from magnum.objects import fields # type: ignore
from magnum.tests.unit.objects import utils # type: ignore
Expand All @@ -32,6 +33,10 @@ def _assert_machine_deployment_config_matches_node_group(self, md, node_group):
assert md is not None
# TODO: more?

@tenacity.retry(
stop=tenacity.stop_after_attempt(10),
wait=tenacity.wait_fixed(1),
)
def _assert_machine_deployments_for_node_groups(
self, *node_groups: magnum_objects.NodeGroup
):
Expand Down

0 comments on commit 0fa09cf

Please sign in to comment.