Skip to content

Commit

Permalink
Merge pull request #3552 from nspcc-dev/fix-wsclient-limit
Browse files Browse the repository at this point in the history
rpcsrv: fix failing TestWSClientsLimit
  • Loading branch information
AnnaShaleva committed Aug 9, 2024
2 parents b27e4f4 + 9ba6db4 commit 79e7898
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/services/rpcsrv/subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,9 @@ func doSomeWSRequest(t *testing.T, ws *websocket.Conn) {
}

func TestWSClientsLimit(t *testing.T) {
for tname, limit := range map[string]int{"default": 0, "8": 8, "disabled": -1} {
for tname, limit := range map[string]int{"8": 8, "disabled": -1} {
effectiveClients := limit
if limit == 0 {
effectiveClients = defaultMaxWebSocketClients
} else if limit < 0 {
if limit < 0 {
effectiveClients = 0
}
t.Run(tname, func(t *testing.T) {
Expand Down

0 comments on commit 79e7898

Please sign in to comment.