]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Don't run test_volume.VolumeTestCase twice
authorTom Barron <tpb@dyncloud.net>
Wed, 2 Mar 2016 02:43:17 +0000 (21:43 -0500)
committerTom Barron <tpb@dyncloud.net>
Wed, 2 Mar 2016 19:15:47 +0000 (19:15 +0000)
commit4efeeb1e4532943dd4257033667ffd7e3fea2eee
tree66785847eeb64b6b18686652f83168f2065f8b7f
parent82d1d81124531d679b8e283c06b45b2b4bc37080
Don't run test_volume.VolumeTestCase twice

Currently the test_volume.VolumeMigrationTestCase class inherits
from test_volume.VolumeTestCase and therefore runs all the unit tests
in the former class in addition to the 29 tests defined in its
own class.  This provides no gain in coverage and is costly since
the tests in VolumeTestCase are among the most expensive we have.

This commit refactors cinder/tests/unit/test_volume.py such that
VolumeMigrationTestCase inherits directly from BaseVolumeTestCase,
thereby reducing the number of tests run from test_volume from
557 to 412, and total execution time (on my system) from 335s to
202s.  Only duplicate tests are removed.

Depends-On: Ia70e51719abb9a6ed357802446847ffa81d7427e

Change-Id: Ief4706f50838e1f906119992302a39a6014126b3
cinder/tests/unit/test_volume.py