Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-9149] fix data race in TestRegister_MutualTLS
The events/producer package uses a global variable to hold a reference to the singleton eventProcessor. Because of various anti-patterns around this singleton instance, the tests are forced to reset the object between tests. The reset that's performed between tests would race with the running go routines that were started when the event processor was created. The race is avoided by grabbing the mutex on the global event processor before resetting its state. While this does not address the anti-patterns, it's a focused change to fix the race. Change-Id: Ibd5be16a8f49cd9300e2288afbdc551b9a58b37c Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
- Loading branch information