OSX unit tests intermittently fail due to coverage conflict

Bug #1131023 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Vish Ishaya

Bug Description

Running unit tests with a high concurrency will lead to random test failures like the following:

Traceback (most recent call last):
  File "nova/tests/test_libvirt.py", line 4153, in test_create_cow_image
    libvirt_utils.create_cow_image('/some/path', '/the/new/cow')
  File "nova/virt/libvirt/utils.py", line 174, in create_cow_image
    base_details = images.qemu_img_info(backing_file)
  File "/usr/local/lib/python2.7/site-packages/coverage/control.py", line 234, in _should_trace
    canonical = self.file_locator.canonical_filename(filename)
  File "/usr/local/lib/python2.7/site-packages/coverage/files.py", line 42, in canonical_filename
    if os.path.exists(f):
  File "/usr/local/lib/python2.7/site-packages/mox.py", line 765, in __call__
    return mock_method(*params, **named_params)
  File "/usr/local/lib/python2.7/site-packages/mox.py", line 1002, in __call__
    expected_method = self._VerifyMethodCall()
  File "/usr/local/lib/python2.7/site-packages/mox.py", line 1060, in _VerifyMethodCall
    raise UnexpectedMethodCallError(self, expected)
UnexpectedMethodCallError: Unexpected method call. unexpected:- expected:+
- exists.__call__('./nova/virt/images.py') -> None
+ exists.__call__('/some/path') -> True

Changed in nova:
importance: Undecided → Low
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/22511

Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/22511
Committed: http://github.com/openstack/nova/commit/ce8cf3dcefb0a432381a4461b930a0a56ad22292
Submitter: Jenkins
Branch: master

commit ce8cf3dcefb0a432381a4461b930a0a56ad22292
Author: Vishvananda Ishaya <email address hidden>
Date: Wed Feb 20 19:05:44 2013 -0800

    Use a fake coverage module instead of real one.

    Actually loading the coverage module was leading to odd concurrency
    conditions where it was interfering with mocked calls. This changes
    to stub out the coverage class with a fake one so that we don't have
    to worry about collisions. It also modifies the coverage class to be
    created lazily so it isn't automatically started at import time.
    Finally it removes the hack in run_tests.sh ignoring the coverage
    tests.

    Fixes bug 1131023

    Change-Id: I39de434454f8b0903f6311e731e215a93027bc91

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