diff options
author | Sri Vignesh <sselvan@redhat.com> | 2019-12-27 12:16:33 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bala12352@gmail.com> | 2020-02-18 05:45:36 +0000 |
commit | 25064013d6c0889db3d2bf931b0b2d01c72f6a96 (patch) | |
tree | 52e1b4814202b6445a717a27195fd5a7b16b6b2c /tests/functional/glusterd/test_peer_detach.py | |
parent | 49e9cdbc710ed25434f5e7faec94281afa8d54ce (diff) |
Add steps to stabilize the existing content in glusterd
Added wait_for_io_to_complete function to testcases
used wait_for_glusterd function
and wait_for_peer_connect function
Change-Id: I4811848aad8cca4198cc93d8e200dfc47ae7ac9b
Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'tests/functional/glusterd/test_peer_detach.py')
-rw-r--r-- | tests/functional/glusterd/test_peer_detach.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/functional/glusterd/test_peer_detach.py b/tests/functional/glusterd/test_peer_detach.py index 8b6077b60..a3ac83fc9 100644 --- a/tests/functional/glusterd/test_peer_detach.py +++ b/tests/functional/glusterd/test_peer_detach.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com> +# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -43,14 +43,20 @@ class PeerDetachVerification(GlusterBaseClass): g.log.info("All server peers are already in connected state " "%s:", cls.servers) - @classmethod - def tearDownClass(cls): + def tearDown(self): + + ret = peer_probe_servers(self.mnode, self.servers) + if not ret: + raise ExecutionError("Failed to peer probe servers") + # stopping the volume and Cleaning up the volume - ret = cls.cleanup_volume() - if ret: - g.log.info("Volume deleted successfully : %s", cls.volname) - else: - raise ExecutionError("Failed Cleanup the Volume %s" % cls.volname) + ret = self.cleanup_volume() + if not ret: + raise ExecutionError("Failed Cleanup the Volume %s" % self.volname) + g.log.info("Volume deleted successfully : %s", self.volname) + + # Calling GlusterBaseClass tearDown + self.get_super_method(self, 'tearDown')() def test_peer_detach_host(self): # peer Detaching specified server from cluster |