From 0caa54bae89dc3f3f47348129c1bc137b44a6a4d Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Fri, 19 Jun 2020 14:30:22 +0530 Subject: [PATCH] qa/tasks/cephfs/nfs: Poll for max 60 seconds to ensure removal of ganesha services Fixes: https://tracker.ceph.com/issues/46104 Signed-off-by: Varsha Rao --- qa/tasks/cephfs/test_nfs.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/test_nfs.py b/qa/tasks/cephfs/test_nfs.py index 850b0b736ef..a2ce2382f82 100644 --- a/qa/tasks/cephfs/test_nfs.py +++ b/qa/tasks/cephfs/test_nfs.py @@ -64,9 +64,15 @@ class TestNFS(MgrTestCase): def _test_delete_cluster(self): self._nfs_cmd('cluster', 'delete', self.cluster_id) - time.sleep(8) - orch_output = self._check_nfs_status() - self.assertEqual("No services reported\n", orch_output) + expected_output = "No services reported\n" + wait_time = 10 + while wait_time <= 60: + time.sleep(wait_time) + orch_output = self._check_nfs_status() + if expected_output == orch_output: + return + wait_time += 10 + self.fail("NFS Ganesha cluster could not be deleted") def _create_export(self, export_id, create_fs=False, extra_cmd=None): if create_fs: -- 2.39.5