diff options
Diffstat (limited to 'helpers/general_test.go')
-rw-r--r-- | helpers/general_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helpers/general_test.go b/helpers/general_test.go index 95d9c5461..b2ee03f15 100644 --- a/helpers/general_test.go +++ b/helpers/general_test.go @@ -65,10 +65,10 @@ func TestDistinctLoggerDoesNotLockOnWarningPanic(t *testing.T) { // Set PanicOnWarning to true to reproduce issue 9380 // Ensure global variable loggers.PanicOnWarning is reset to old value after test - if loggers.PanicOnWarning == false { - loggers.PanicOnWarning = true + if !loggers.PanicOnWarning.Load() { + loggers.PanicOnWarning.Store(true) defer func() { - loggers.PanicOnWarning = false + loggers.PanicOnWarning.Store(false) }() } |