tests: Clear txn id on init for all debug loggers
Since we fake out all the greenthread stuff to run in the main thread, we can (sometimes?) find that a transaction ID has already been set, leading to failures in test_bad_request_app_logging like AssertionError: b'X-Trans-Id: test-trans-id' not found in b'X-Trans-Id: tx...' By resetting the logger's txn_id, we're assured that our mock will be run and the expected transaction ID will be used. Change-Id: I465eed5372a2a5e591f80a09676f4b7f091cd444
This commit is contained in:
parent
51ae9b00c9
commit
1ee9b1e3ba
@ -249,6 +249,9 @@ class DebugLogger(FakeLogger):
|
||||
|
||||
|
||||
class DebugLogAdapter(utils.LogAdapter):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DebugLogAdapter, self).__init__(*args, **kwargs)
|
||||
self.txn_id = None
|
||||
|
||||
def __getattribute__(self, name):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user