fail_gracefully can exit test suite

Bug #1276885 reported by Jamie Lennox
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Jamie Lennox

Bug Description

If an exception happens in the startup phase of keystone (not handling a request) it falls through to the handler @fail_gracefully which is designed to print a big warning message and exit the application.

This makes sense for running keystone but in the case of tests what it means is that the exit() call shuts down the subunit thread running the tests and leads to difficult to diagnose failures being reported - or missed.

In the case of testing @fail_gracefully should fail very ungracefully.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
assignee: nobody → Jamie Lennox (jamielennox)
status: New → In Progress
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/71443
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=29b6421518de25d067ade422d3513a89d6febd60
Submitter: Jenkins
Branch: master

commit 29b6421518de25d067ade422d3513a89d6febd60
Author: Jamie Lennox <email address hidden>
Date: Thu Feb 6 12:38:26 2014 +1000

    Mock sys.exit in testing

    If exit is called during subunit then it exits the subunit process which
    makes the test suite fail with no information.

    Change-Id: I7c189fad05f0d38c35e4014ff414d91841bc7632
    Closes-Bug: #1276885

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