fixing racing condition on cinder and nova controller with L7 servers checks.

This commit is contained in:
Gabriel Cocenza
2023-03-27 17:04:43 -03:00
parent 6ff3f32d2f
commit 38a2f159a6
2 changed files with 5 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ import json
import logging
import os
import tempfile
import tenacity
import unittest
import urllib
from configparser import ConfigParser
@@ -769,6 +770,8 @@ class NovaCloudControllerActionTest(test_utils.OpenStackBaseTest):
to avoid breaking older version.
"""
@tenacity.retry(wait=tenacity.wait_exponential(multiplier=1, max=60),
reraise=True, stop=tenacity.stop_after_attempt(4))
def test_sync_compute_az_action(self):
"""Test sync-compute-availability-zones action."""
juju_units_az_map = {}

View File

@@ -616,6 +616,8 @@ class CinderTests(BasePolicydSpecialization):
super(CinderTests, cls).setUpClass(application_name="cinder")
cls.application_name = "cinder"
@tenacity.retry(wait=tenacity.wait_fixed(1),
reraise=True, stop=tenacity.stop_after_delay(8))
def get_client_and_attempt_operation(self, ip):
"""Attempt to list the images as a policyd override.