Stubs are unset too late in new cinder.test.TestCase

Bug #1185004 reported by Yuriy Taraday on 2013-05-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Yuriy Taraday

Bug Description

Due to wrong order of addCleanup calls FLAGS.reset is called before all stubs are unset. This causes valid tests to fail.

For example, test_delete_volume_path_exist in https://review.openstack.org/#/c/27051/10/cinder/tests/test_block_device.py fails after switch to testtools.

Log is here: http://logs.openstack.org/27051/10/check/gate-cinder-python27/3603/console.html

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

Changed in cinder:
assignee: nobody → Yuriy Taraday (yorik-sar)
status: New → In Progress

Reviewed: https://review.openstack.org/30720
Committed: http://github.com/openstack/cinder/commit/8d7703c86baac6636377bb94e352fca018b1ddd8
Submitter: Jenkins
Branch: master

commit 8d7703c86baac6636377bb94e352fca018b1ddd8
Author: Yuriy Taraday <email address hidden>
Date: Tue May 28 16:44:51 2013 +0400

    Unset all stubs before running other cleanups.

    Cleanup callbacks are run in reverse order so all stubs unsetting
    should be added at the end of the cleanup list.

    Fixes bug 1185004

    Change-Id: I5ad3ea2cdce663aaeae6b7cc2cb9c5dac9d12435

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-07-17
Changed in cinder:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers