summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_glusterd_logs_when_peer_detach.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/glusterd/test_glusterd_logs_when_peer_detach.py')
-rw-r--r--tests/functional/glusterd/test_glusterd_logs_when_peer_detach.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/functional/glusterd/test_glusterd_logs_when_peer_detach.py b/tests/functional/glusterd/test_glusterd_logs_when_peer_detach.py
index ed8ba0385..2ffa50392 100644
--- a/tests/functional/glusterd/test_glusterd_logs_when_peer_detach.py
+++ b/tests/functional/glusterd/test_glusterd_logs_when_peer_detach.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2018-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
@@ -24,7 +24,8 @@ from glusto.core import Glusto as g
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.gluster_base_class import GlusterBaseClass
from glustolibs.gluster.peer_ops import (peer_detach_servers,
- peer_probe_servers)
+ peer_probe_servers,
+ is_peer_connected)
class GlusterdLogsWhilePeerDetach(GlusterBaseClass):
@@ -33,14 +34,17 @@ class GlusterdLogsWhilePeerDetach(GlusterBaseClass):
"""
tearDown for every test
"""
- # Peer probe detached server
- ret = peer_probe_servers(self.mnode, self.random_server)
+ # checking for peer status from every node
+ ret = is_peer_connected(self.mnode, self.servers)
if not ret:
- raise ExecutionError(ret, "Failed to probe detached server")
- g.log.info("peer probe is successful for %s", self.random_server)
+ ret = peer_probe_servers(self.mnode, self.random_server)
+ if not ret:
+ raise ExecutionError("Failed to peer probe failed in "
+ "servers %s" % self.random_server)
+ g.log.info("All peers are in connected state")
# Calling GlusterBaseClass tearDown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_logs_while_peer_detach(self):
'''