summaryrefslogtreecommitdiffstats
path: root/tests/functional/afr/test_self_heal_with_quota_object_limit.py
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2020-01-29 17:09:26 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-02-18 05:47:32 +0000
commitf2e420c0e015e9dc75fe8f86452000291ba704d8 (patch)
tree424560330915a746e2c78fb20b8d236fd3f2de85 /tests/functional/afr/test_self_heal_with_quota_object_limit.py
parent458ae92da119b3b8d378bb6021190891b265368f (diff)
[testfix] Add steps to stabilize afr testcases
Added steps to reset volume and resolved teardown class cleanup failures. Change-Id: I06b0ed8810c9b064fd2ee7c0bfd261928d8c07db
Diffstat (limited to 'tests/functional/afr/test_self_heal_with_quota_object_limit.py')
-rw-r--r--tests/functional/afr/test_self_heal_with_quota_object_limit.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/functional/afr/test_self_heal_with_quota_object_limit.py b/tests/functional/afr/test_self_heal_with_quota_object_limit.py
index f77f23b4d..39d49e675 100644
--- a/tests/functional/afr/test_self_heal_with_quota_object_limit.py
+++ b/tests/functional/afr/test_self_heal_with_quota_object_limit.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
@@ -79,17 +79,19 @@ class HealFilesWhenQuotaObjectLimitExceeded(GlusterBaseClass):
raise ExecutionError("Failed to Setup_Volume and Mount_Volume")
g.log.info("Successful in Setup Volume and Mount Volume")
- @classmethod
- def tearDownClass(cls):
-
- # Cleanup Volume
- g.log.info("Starting to clean up Volume %s", cls.volname)
- ret = cls.unmount_volume_and_cleanup_volume(cls.mounts)
+ def tearDown(self):
+ """
+ Cleanup and umount volume
+ """
+ # Cleanup and umount volume
+ g.log.info("Starting to Unmount Volume and Cleanup Volume")
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to create volume")
- g.log.info("Successful in cleaning up Volume %s", cls.volname)
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass teardown
+ self.get_super_method(self, 'tearDown')()
def test_heal_when_quota_object_limit_exceeded(self):
# Create a directory to set the quota_limit_objects