替换 go.uber.org/atomic

This commit is contained in:
bjdgyc
2022-10-09 15:16:22 +08:00
parent 4a412fe0ee
commit 6f875001f2
4 changed files with 23 additions and 24 deletions

View File

@@ -30,9 +30,9 @@ func TestConnSession(t *testing.T) {
err := cSess.RateLimit(100, true)
ast.Nil(err)
ast.Equal(cSess.BandwidthUp, uint32(100))
ast.Equal(cSess.BandwidthUp.Load(), uint32(100))
err = cSess.RateLimit(200, false)
ast.Nil(err)
ast.Equal(cSess.BandwidthDown, uint32(200))
ast.Equal(cSess.BandwidthDown.Load(), uint32(200))
cSess.Close()
}