mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Make account lookup faster with sync.Map
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -28,7 +28,7 @@ func TestSplitBufferSubOp(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Error creating gateways: %v", err)
|
||||
}
|
||||
s := &Server{gacc: NewAccount(globalAccountName), accounts: make(map[string]*Account), gateway: gws}
|
||||
s := &Server{gacc: NewAccount(globalAccountName), gateway: gws}
|
||||
s.registerAccount(s.gacc)
|
||||
c := &client{srv: s, acc: s.gacc, msubs: -1, mpay: -1, mcl: 1024, subs: make(map[string]*subscription), nc: cli}
|
||||
|
||||
@@ -65,7 +65,7 @@ func TestSplitBufferSubOp(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSplitBufferUnsubOp(t *testing.T) {
|
||||
s := &Server{gacc: NewAccount(globalAccountName), accounts: make(map[string]*Account), gateway: &srvGateway{}}
|
||||
s := &Server{gacc: NewAccount(globalAccountName), gateway: &srvGateway{}}
|
||||
s.registerAccount(s.gacc)
|
||||
c := &client{srv: s, acc: s.gacc, msubs: -1, mpay: -1, mcl: 1024, subs: make(map[string]*subscription)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user