Comment 3 for bug 1964497

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/833115
Committed: https://opendev.org/openstack/nova/commit/84c6d05ac343029cf151c35d4696cee0dc74f2c9
Submitter: "Zuul (22348)"
Branch: master

commit 84c6d05ac343029cf151c35d4696cee0dc74f2c9
Author: Artom Lifshitz <email address hidden>
Date: Thu Mar 10 10:53:13 2022 -0500

    Fix unit tests when they are run with OS_DEBUG=True

    This patch fix test_default_logging test.
    The test validates that we have two logging handlers:
    1 x to display default messages (info, error, warnings...)
    1 x to redirect debug messages to null and so don't display them.

    However, if OS_DEBUG=True is set in a shell session, then the test is
    run and fails. Because, in debug mode, we should have only one handler
    to display all messages. (look at comments for more details and
     test_debug_logging test).

    To fix the test, we explicitly set OS_DEBUG=0 when running
    test_default_logging, so it will ensure we have two handlers whatever
    OS_DEBUG value.

    Co-authored-by: Rene Ribaud <email address hidden>
    Closes-Bug: #1964497

    Change-Id: I7c0151d988c538dd2d083aab4b3e18ddb8151045