Refactor unit tests to us a fake logging class

Bug #701248 reported by Chuck Thier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Low
Unassigned

Bug Description

Running the unit tests creates a *lot* of logs. As we add more tests, it also happens to break a default install of syslog-ng due to running out of connections. It would be nice if we could use a fake logging class for tests so no real logs would be generated, and not require a logging system to be installed to just run unit tests.

Chuck Thier (cthier)
Changed in swift:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

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

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

Reviewed: https://review.openstack.org/7023
Committed: http://github.com/openstack/swift/commit/f7fdb9cf12585b104a6ffabaadbc2d3a3b0b019f
Submitter: Jenkins
Branch: master

commit f7fdb9cf12585b104a6ffabaadbc2d3a3b0b019f
Author: Dan Dillinger <email address hidden>
Date: Mon Apr 30 16:38:15 2012 -0400

    Implement unit_test config to disable syslog.

    bug 701248
    bug 819303

    This change makes syslog optional, by providing a unit test
    config with the ability to cause test/unit/__init__.py to
    replace SysLogHandler with a fake logging class. The
    default behavior is unchanged.

    FakeLogger now inherits directly from Handler and mocks out
    its API - this was a backward-compatibility issue.

    Change-Id: I653dec148c4f6cf81759de03964c6a3290c1a290

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