Several tests run slow because of missing API mocks causing them to wait for a timeout

Bug #1407981 reported by Sam Betts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Expired
Medium
Unassigned

Bug Description

When calling run_tests.sh several tests take far longer to run than others and on closer inspection of the specific tests, it appears that in many cases the mocks for some of the API services have been left out, but no error/timeout message is appearing in the logs because those calls in the code are made inside of try except statements.

Sam Betts (sambetts)
Changed in horizon:
assignee: nobody → Sam Betts (sambetts)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

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

Reviewed: https://review.openstack.org/154929
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=9dfef5a6b9751fc67f008b1f8f2999cf86929825
Submitter: Jenkins
Branch: master

commit 9dfef5a6b9751fc67f008b1f8f2999cf86929825
Author: Sam Betts <email address hidden>
Date: Wed Feb 11 15:49:21 2015 +0000

    Add missing stubs to project stacks tests

    test_check_stack, test_suspend_stack and test_resume_stack all had
    missing stubs for api.heat, causing weird logs in the tests, as well as
    not testing the actions correctly as it would fail before reaching the
    action code.

    Change-Id: I6aeb2d2c1b6af9222e8ec3691b876051c638e3de
    Partial-Bug: 1407981

Changed in horizon:
importance: Undecided → Medium
Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

It's tricky finding such places - I can't identify obvious bad tests from watching the log. Do you have some mechanism for making it easier to find these things, apart from perhaps monkeypatching the http library?

Revision history for this message
Akihiro Motoki (amotoki) wrote :

As of Pike, we have a sentinel mock which detects unmocked method access and causes a corresponding UT failure, so I think the problem has gone. Marking this as Incomplete.

Changed in horizon:
assignee: Sam Betts (sambetts) → nobody
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Dashboard (Horizon) because there has been no activity for 60 days.]

Changed in horizon:
status: Incomplete → Expired
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.