mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fixing race conditions in the code base (#5966)
* Adding initial race detector * Remove setting of config twice * Fixing config file watch and config reload on license save * Fixing config file watch and config reload on license save * Fixing build error * Fixing locking issue * Fixing makefile * Fixing race in config * Fixing race in status unit test * Adding EE race tests * Fixing race in cluster info * Removing code that's isn't needed * Fixing some more races * Fixing govet issue
This commit is contained in:
committed by
Harrison Healey
parent
32460bf63b
commit
6bf080393d
@@ -72,6 +72,8 @@ func FindDir(dir string) string {
|
||||
}
|
||||
|
||||
func DisableDebugLogForTest() {
|
||||
cfgMutex.Lock()
|
||||
defer cfgMutex.Unlock()
|
||||
if l4g.Global["stdout"] != nil {
|
||||
originalDisableDebugLvl = l4g.Global["stdout"].Level
|
||||
l4g.Global["stdout"].Level = l4g.ERROR
|
||||
@@ -79,6 +81,8 @@ func DisableDebugLogForTest() {
|
||||
}
|
||||
|
||||
func EnableDebugLogForTest() {
|
||||
cfgMutex.Lock()
|
||||
defer cfgMutex.Unlock()
|
||||
if l4g.Global["stdout"] != nil {
|
||||
l4g.Global["stdout"].Level = originalDisableDebugLvl
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user