summaryrefslogtreecommitdiffstats
path: root/test/unit/common/test_utils.py
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-07-26 15:56:26 -0400
committerPeter Portante <pportant@redhat.com>2013-07-29 08:21:10 -0700
commit5c69ad3da1375635a068ec0d7b1ea7103abd5d44 (patch)
treeda61801034646ca5cbc0c74421e116a0f633773d /test/unit/common/test_utils.py
parent81bb4c40724030c34d817a8a47b4e4d0cbea0312 (diff)
perf: Container and account performance inc
* Container and accounts performance increase by removing the need to update either the object count or the container count, respectively. New hidden configuratoins added to re-enable the functionality. * object_only configuratoin removed from fs.conf and replaced with a hidden configuration. The new hidden configuration reports gratuituosly crated directories as objects, to support a compatibility behavior with previous version 1.4.8 (even though it was incorrect). BUG 988969: https://bugzilla.redhat.com/show_bug.cgi?id=988969 Change-Id: Idca20b8629ec38606ff5692fe62bc2cadabffc86 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/5403 Reviewed-by: Peter Portante <pportant@redhat.com> Tested-by: Peter Portante <pportant@redhat.com>
Diffstat (limited to 'test/unit/common/test_utils.py')
-rw-r--r--test/unit/common/test_utils.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py
index 6622f45..bbba7e2 100644
--- a/test/unit/common/test_utils.py
+++ b/test/unit/common/test_utils.py
@@ -585,23 +585,19 @@ class TestUtils(unittest.TestCase):
os.chdir(orig_cwd)
shutil.rmtree(td)
- def test_get_container_details_ufo(self):
+ def test_get_container_details(self):
orig_cwd = os.getcwd()
- __obj_only = Glusterfs.OBJECT_ONLY
td = tempfile.mkdtemp()
try:
tf = tarfile.open("common/data/container_tree.tar.bz2", "r:bz2")
os.chdir(td)
tf.extractall()
- Glusterfs.OBJECT_ONLY = False
-
obj_list, object_count, bytes_used = \
utils.get_container_details(td)
assert bytes_used == 0, repr(bytes_used)
- assert object_count == 8, repr(object_count)
+ assert object_count == 5, repr(object_count)
assert set(obj_list) == set(['file1', 'file3', 'file2',
- 'dir3', 'dir1', 'dir2',
'dir1/file1', 'dir1/file2'
]), repr(obj_list)
@@ -616,7 +612,6 @@ class TestUtils(unittest.TestCase):
finally:
os.chdir(orig_cwd)
shutil.rmtree(td)
- Glusterfs.OBJECT_ONLY = __obj_only
def test_get_container_details_from_fs_do_getsize_true(self):
orig_cwd = os.getcwd()