Reduce running time of test_different_sizes
Unit test test_different_sizes from RealFilePartitioningTestCase tests 26 variants of partitions sizes and applies each of them to a file, therefore running time of this test more than 30s. This patch reduce variants to some "typical", running time now about 5s. Change-Id: I072666009f4ecca51e84a6dc71257d725aaf2f42
This commit is contained in:
parent
ff20dda8db
commit
005d841339
@ -15,7 +15,6 @@
|
||||
# under the License.
|
||||
|
||||
import fixtures
|
||||
import itertools
|
||||
import mock
|
||||
import os
|
||||
import tempfile
|
||||
@ -687,10 +686,8 @@ class RealFilePartitioningTestCase(tests_base.TestCase):
|
||||
def test_different_sizes(self):
|
||||
# NOTE(dtantsur): Keep this list in order with expected partitioning
|
||||
fields = ['ephemeral_mb', 'swap_mb', 'root_mb']
|
||||
variants = itertools.product([0, 1, 5], repeat=3)
|
||||
variants = ((0, 0, 12), (4, 2, 8), (0, 4, 10), (5, 0, 10))
|
||||
for variant in variants:
|
||||
if variant == (0, 0, 0):
|
||||
continue
|
||||
kwargs = dict(zip(fields, variant))
|
||||
self._run_without_root(utils.work_on_disk, self.file.name,
|
||||
ephemeral_format='ext4', node_uuid='',
|
||||
|
Loading…
x
Reference in New Issue
Block a user