-
Notifications
You must be signed in to change notification settings - Fork 186
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
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. Modifications: - Make a new (thread safe) StringWriter for each thread. Based on the usage pattern for the LoggerStringWriter methods this should have the effect of having a unique writer per test. - Make a thread-safe proxy for the StringWriter so it's safe to write and read from concurrently.
- Loading branch information
1 parent
b8149d3
commit b20368c
Showing
1 changed file
with
68 additions
and
20 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