all: Use new Go 1.19 atomic types (#8772)
This commit is contained in:
@@ -21,7 +21,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -3097,7 +3096,7 @@ func TestFolderRestartZombies(t *testing.T) {
|
||||
m.ScanFolder("default")
|
||||
|
||||
// Check how many running folders we have running before the test.
|
||||
if r := atomic.LoadInt32(&m.foldersRunning); r != 1 {
|
||||
if r := m.foldersRunning.Load(); r != 1 {
|
||||
t.Error("Expected one running folder, not", r)
|
||||
}
|
||||
|
||||
@@ -3122,7 +3121,7 @@ func TestFolderRestartZombies(t *testing.T) {
|
||||
wg.Wait()
|
||||
// Make sure the folder is up and running, because we want to count it.
|
||||
m.ScanFolder("default")
|
||||
if r := atomic.LoadInt32(&m.foldersRunning); r != 1 {
|
||||
if r := m.foldersRunning.Load(); r != 1 {
|
||||
t.Error("Expected one running folder, not", r)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user