You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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>
0 commit comments