From b1c5d16055b3aad6d7ae6bb6df90c645c3897075 Mon Sep 17 00:00:00 2001
From: Alex Meade <mr.alex.meade@gmail.com>
Date: Mon, 2 Feb 2015 16:18:15 -0500
Subject: [PATCH] Limit ram and disk used by ceph backup tests

The test_discard_bytes test in
cinder/tests/test_backup_ceph.py uses a lot of
ram and disk space since it tests the ceph driver with
the default chunk size of 128Mi. This patch lowers it
to use 1024 bytes instead.

Closes-bug: #1417293

Change-Id: I387650bc5ffe57ad8a4cacd1fca5d039fec38eed
---
 cinder/tests/test_backup_ceph.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cinder/tests/test_backup_ceph.py b/cinder/tests/test_backup_ceph.py
index 2e6ea938a..fbcf270bb 100644
--- a/cinder/tests/test_backup_ceph.py
+++ b/cinder/tests/test_backup_ceph.py
@@ -643,6 +643,8 @@ class BackupCephTestCase(test.TestCase):
 
     @common_mocks
     def test_discard_bytes(self):
+        # Lower the chunksize to a memory managable number
+        self.service.chunk_size = 1024
         image = self.mock_rbd.Image.return_value
         wrapped_rbd = self._get_wrapped_rbd_io(image)
 
-- 
2.45.2