tests fail due to mocks primitivisation

Bug #892005 reported by Yuriy Taraday
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Behrens

Bug Description

Tests test_instance_set_to_error_on_uncaught_exception and test_network_is_deallocated_on_spawn_failure in test_compute:ComputeTestCase fail because they issue exceptions in wrap_exception'ed methods with notifiers.
Notifier calls utils.to_primitive with convert_instances=True, digs deep until it reaches MockAnything instance and fails with UnexpectedMethodCallError.
We should either add check for mocked objects to utils.to_primitive, which will bring up dependency on mox at runtime, or shut off notifier for the test time.

Revision history for this message
Yuriy Taraday (yorik-sar) wrote :
Revision history for this message
Yuriy Taraday (yorik-sar) wrote :
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Chris Behrens (cbehrens)
Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3026
Committed: http://github.com/openstack/nova/commit/021b4d576c834c120c8e54df4691a49880261f14
Submitter: Jenkins
Branch: master

commit 021b4d576c834c120c8e54df4691a49880261f14
Author: Chris Behrens <email address hidden>
Date: Thu Jan 12 19:11:53 2012 -0800

    Remove skipping of 2 tests

    This fixes bug 892005. Vish put in the real fix, which is to check for
    Mock objects in to_primitive. This patch re-enables 2 skipped tests that
    work now.

    Change-Id: I0b193cf2df987a10ea16f41ae9f39e96426c496a

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-3 → 2012.1
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.