← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1357751] Re: nova.tests.network.test_manager.AllocateTestCase should use mock

 

Reviewed:  https://review.openstack.org/255876
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f92264dab59e53fa27d068bbd0f9fa4927867e14
Submitter: Jenkins
Branch:    master

commit f92264dab59e53fa27d068bbd0f9fa4927867e14
Author: Bharath Thiruveedula <bharath_ves@xxxxxxxxxxx>
Date:   Thu Dec 10 18:42:37 2015 +0530

    Remove start_service calls from the test case
    
    Currently in nova.tests.unit.network.test_manager.AllocateTestCase
    start_service have been used to start nova compute and network services.
    But these calls takes most of the time while running the test cases. In
    this patch start_service method calls are removed to make test cases run
    fast.
    
    Change-Id: I908dc6007d66c482254f07c035e948daff2319f1
    Closes-Bug: #1357751


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1357751

Title:
  nova.tests.network.test_manager.AllocateTestCase should use mock

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Unit tests should not need to start services. Instead, they should
  simply mock out the specific calls out of the unit of code that is
  being tested.

  nova.tests.network.test_manager.AllocateTestCase calls
  self.start_service() for the conductor, network, and compute service,
  and it does so unnecessarily. This results in long test run times and
  tests that are affected by side effects.

  Remove the calls to self.start_service() and replace with proper use
  of mock.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1357751/+subscriptions


References