From: Nizamudeen A Date: Fri, 30 Aug 2024 11:46:57 +0000 (+0530) Subject: qa/tests: fix test_list_enabled_modules timeout error X-Git-Tag: v19.2.3~304^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d07878481dd0f52841df6f59eeba025cc53bad5d;p=ceph.git qa/tests: fix test_list_enabled_modules timeout error This test deals with enabling/disabling the modules. The assumption I have is after enabling the module test will wait for an active mgr but its not able to find it in time and it fails. so taking inspiration from https://github.com/ceph/ceph/pull/58995/commits/6c7253be6f6fbfa6faed7a539cb78847fec04580 adding retries and logs to see if that's the case Fixes: https://tracker.ceph.com/issues/62972 Signed-off-by: Nizamudeen A (cherry picked from commit b2da7394ee02abd6525372d94cab090818cd6c8e) --- diff --git a/qa/tasks/mgr/dashboard/test_mgr_module.py b/qa/tasks/mgr/dashboard/test_mgr_module.py index 2b8b672f28400..d6a368905b6b0 100644 --- a/qa/tasks/mgr/dashboard/test_mgr_module.py +++ b/qa/tasks/mgr/dashboard/test_mgr_module.py @@ -6,7 +6,8 @@ import logging import requests from .helper import (DashboardTestCase, JLeaf, JList, JObj, - module_options_object_schema, module_options_schema) + module_options_object_schema, module_options_schema, + retry) logger = logging.getLogger(__name__) @@ -14,6 +15,7 @@ logger = logging.getLogger(__name__) class MgrModuleTestCase(DashboardTestCase): MGRS_REQUIRED = 1 + @retry(on_exception=RuntimeError, tries=2, delay=0.5, logger=logger) def wait_until_rest_api_accessible(self): """ Wait until the REST API is accessible.