Patch in cisco unit test not being correctly cleared by stopall

Bug #1307025 reported by Kevin Benton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Kevin Benton

Bug Description

A recent patch removed the explicit patch stops from most of the unit tests to let the default mock.patch.stopall handle the cleanup[1]. However, there appears to be cases where stopall loses the reference to a patch and doesn't stop it correctly. In this particular case, the nexus test patch to sys.modules is not being stopped correctly so it's causing unit test failures in the gate[2].

1. https://github.com/openstack/neutron/commit/6546ba570367aba7209ec36544ec4cf742e0bd63
2. http://logs.openstack.org/10/86810/5/check/gate-neutron-python27/89dfa5c/testr_results.html.gz

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/87097

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
milestone: none → ongoing
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit e7ca2541b13d9e755f443b866708865ac22a8bd1
Author: Kevin Benton <email address hidden>
Date: Sat Apr 12 21:27:36 2014 +0000

    Fix dangling patches in Cisco and Midonet tests

    Cisco Nexus Tests:
    Explicitly stops the patch to sys.modules immediately
    after use to fix sporadic failures caused by the patch
    not being handled correctly by mock.patch.stopall.

    Midonet Interface Test:
    Removes the double-patch of the 'device_exists' method
    in ip_lib.

    Closes-Bug: #1307025
    Closes-Bug: #1307038
    Change-Id: Ie22505bb8e406a61e40819d60c76d229916a6e01

Changed in neutron:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in neutron:
milestone: ongoing → juno-rc1
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-rc1 → 2014.2
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.