Unit tests run multiple times due to inheritance
Bug #1374836 reported by
Kevin Benton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Kevin Benton |
Bug Description
There are several cases in the unit test code where a unit test is executed multiple times with no difference to the configuration. The root cause of this is usually a test defined in a base test case that is mixed into several other test cases. Another major cause is having a test case that inherits from the l3nat router test case and another that inherits from the extraroute test case, which already inherits from the l3nat test case.
Changed in neutron: | |
assignee: | nobody → Kevin Benton (kevinbenton) |
status: | New → In Progress |
Changed in neutron: | |
milestone: | none → kilo-1 |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | kilo-1 → 2015.1.0 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/122911 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=c19a227c0ed a5c88a4e0de7887 8dc6332167c14e
Committed: https:/
Submitter: Jenkins
Branch: master
commit c19a227c0eda5c8 8a4e0de78878dc6 332167c14e
Author: Kevin Benton <email address hidden>
Date: Thu Sep 18 06:52:13 2014 -0700
Remove some duplicate unit tests
There are several locations where some unit test mixins are
incorrectly used multiple times with an otherwise same configuration,
which results in pointless re-runs of the same unit test. Similarily,
there are a few tests defined in classes inherited by multiple tests
that don't change behavior in the child tests so they are run multiple
times as well.
This patch eliminates the duplicates and moves some test cases from
their parent class into a subclass when they don't need to be run multiple
times. The result is 221 fewer test runs (~1.5% of the tests run).
Closes-Bug: #1374836 510fa1250920d41 be2a50dabaf
Change-Id: I292091488cd944