Unit tests run multiple times due to inheritance

Bug #1374836 reported by Kevin Benton
6
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/122911
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c19a227c0eda5c88a4e0de78878dc6332167c14e
Submitter: Jenkins
Branch: master

commit c19a227c0eda5c88a4e0de78878dc6332167c14e
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
    Change-Id: I292091488cd944510fa1250920d41be2a50dabaf

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.