-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mdc-utils: Make LoggerStringWriter thread friendly (#2771)
Motivation: We have seen some flakyness in `HttpMessageDiscardWatchdogServiceFilterTest` that may be related to thread safety for the test log appender. Specifically, - The sink, a `StringWriter`, is globally shared so it can be reset by concurrently running tests. - The underlying `StringWriter` itself isn't thread safe and it's possible for it to be concurrent written to and read from potentially leading to state corruption. Modifications: - Make a `LoggerStringWriter` usable as an instance instead of as static functions. This gives each test suite it's own state that it easier to control. - Make a thread-safe proxy for the StringWriter so it's safe to write and read from concurrently.
- Loading branch information
1 parent
e3a10f8
commit 112fb07
Showing
8 changed files
with
115 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.