Logging output to stderr not properly captured during test runs

Bug #914592 reported by Gabriel Hurley on 2012-01-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Gabriel Hurley

Bug Description

On some systems (I can't identify a pattern of OS, Python version, etc.) the logging output which is directed to stderr by logging.StreamHandler isn't properly captured by the test runner and shows up in the console output. This makes it look like the tests fail when they did not, and makes debugging real test failures nearly impossible.

A sample of what this looks like from Tres Henry: https://gist.github.com/1590646

Using nose's --clear-all-handlers flag corrects the problem, however that introduces a new problem on systems which did not previously experience this bug wherein it prints an error message saying there's no handler for [insert logging call here].

Instead, the only viable solution I can find is to add logging config to the test settings which directs to the NullHandler instead of StreamHandler.

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
status: New → Confirmed

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

Changed in horizon:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/2954
Committed: http://github.com/openstack/horizon/commit/cf7d2c16578e148ad04b98631e0b32598801c007
Submitter: Jenkins
Branch: master

commit cf7d2c16578e148ad04b98631e0b32598801c007
Author: Gabriel Hurley <email address hidden>
Date: Tue Jan 10 21:28:05 2012 -0800

    Silences logging output during test runs.

    Fixes bug 914592.

    Change-Id: Idc2d9a0a85424ccf45b6ef8f84daaea1d1e56549

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-01-25
Changed in horizon:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in horizon:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers