diff options
author | Zuul <zuul@review.opendev.org> | 2023-04-26 09:52:39 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-04-26 09:52:39 +0000 |
commit | 935366e2473e2b358b61533d9f90078f89274986 (patch) | |
tree | b1e08e40e8952ca217d88dab2102ed8840817008 | |
parent | 66fa187586fd4ffe475ddf71e1fb16b74f4ff1d7 (diff) | |
parent | 2964a50fd49a15b4ca3c14806052e928593a2412 (diff) | |
download | horizon-935366e2473e2b358b61533d9f90078f89274986.tar.gz |
Merge "Stability improvement of Instance tests"
-rw-r--r-- | openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py b/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py index 92a292347..274fbb09c 100644 --- a/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py +++ b/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py @@ -9,7 +9,11 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + +import time + import netaddr + from selenium.common import exceptions from selenium.webdriver.common import by @@ -75,8 +79,14 @@ class InstancesPage(basepage.BaseNavigationPage): self._page_title = "Instances" def _get_row_with_instance_name(self, name): - return self.instances_table.get_row(self.INSTANCES_TABLE_NAME_COLUMN, - name) + for attempt in range(4): + row = self.instances_table.get_row( + self.INSTANCES_TABLE_NAME_COLUMN, name) + if row is not None: + return row + else: + time.sleep(0.5) + return None def _get_rows_with_instances_names(self, names): return [ |