Closed Bug 969169 Opened 6 years ago Closed 6 years ago
Every instance of browserid
_identity creates a new Dump Appender
browserid_identity sets up logging in the BrowserIDManager() constructor. Normally this isn't a problem as there is normally only 1 instance created. However, the tests cause multiple instances to be created, and this causes a new DumpAppender to be created each time, which in turn causes a duplication of log messages each test run.
This patch makes "log" a module-level lazy attribute. The instance still initializes this._log to log.
Assignee: nobody → mhammond
Status: NEW → ASSIGNED
Attachment #8371964 - Flags: review?(ttaubert)
Attachment #8371964 - Flags: review?(ttaubert) → review+
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
Comment on attachment 8371964 [details] [diff] [review] 0003-Bug-969169-ensure-logging-is-only-initialized-once.-.patch [Approval Request Comment] Bug caused by (feature/regressing bug #): ? User impact if declined: None. Testing completed (on m-c, etc.): Good on m-c for a while. Risk to taking this patch (and alternatives if risky): None. String or IDL/UUID changes made by this patch: None. I think we should uplift this to get rid of duplicate messages in test runs on Aurora.
Attachment #8371964 - Flags: approval-mozilla-aurora?
Attachment #8371964 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.