TestNecAgentMain.test_main kills test runner

Bug #1192270 reported by Roman Bogorodskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Roman Bogorodskiy

Bug Description

Test TestNecAgentMain.test_main() calls main() of the nec_agent which in its order calls sys.exit(0). Since the test doesn't handle it in any way, it kills test runner and reports testr that tests are passed.

Output of "tox -epy27 quantum.tests.unit.nec.test_nec_agent"

Ran 6 (-2) tests in 0.062s (-0.009s)
PASSED (id=29)

Without sys.exit() call the same command results in:

Ran 8 (+2) tests in 0.072s (+0.010s)
PASSED (id=30)

Tags: unittest nec
Changed in quantum:
assignee: nobody → Roman Bogorodskiy (novel)
status: New → In Progress
Changed in quantum:
importance: Undecided → Medium
tags: added: nec unittest
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/33479
Committed: http://github.com/openstack/quantum/commit/381cb1c4e4b5122a8afae67ad4cbeebcb39cbf83
Submitter: Jenkins
Branch: master

commit 381cb1c4e4b5122a8afae67ad4cbeebcb39cbf83
Author: Roman Bogorodskiy <email address hidden>
Date: Tue Jun 18 13:12:27 2013 -0400

    Fix TestNecAgentMain not to call sys.exit()

    test_main() was calling sys.exit() killing test running
    and not allowing tests to complete in a proper way.

    Drop explicit sys.exit() call from net agent's main() and
    fix outdated mocks in test_main().

    Fixes bug #1192270

    Change-Id: Iea8d5508f73eb9144e452de3305f2dec4c2a319c

Changed in quantum:
status: In Progress → Fix Committed
Changed in quantum:
milestone: none → havana-2
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-2 → 2013.2
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.