Skip to content

Commit

Permalink
rpcsrv: fix concurrent test TestClient_IteratorSessions
Browse files Browse the repository at this point in the history
The default for `MaxConnsPerHost` is "no limit", so it'll use as many
connections as it can (potentially hitting MacOS/Windows limits
golang/go#20960 (comment) ).

Close #3300

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
  • Loading branch information
AliceInHunterland committed Mar 11, 2024
1 parent 0e47d66 commit 588d7c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/services/rpcsrv/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ func TestClient_NNS(t *testing.T) {
func TestClient_IteratorSessions(t *testing.T) {
_, rpcSrv, httpSrv := initServerWithInMemoryChain(t)

c, err := rpcclient.New(context.Background(), httpSrv.URL, rpcclient.Options{})
c, err := rpcclient.New(context.Background(), httpSrv.URL, rpcclient.Options{MaxConnsPerHost: 50})
require.NoError(t, err)
require.NoError(t, c.Init())

Expand Down Expand Up @@ -1509,8 +1509,8 @@ func TestClient_IteratorSessions(t *testing.T) {
wg.Add(storageItemsCount)
check := func(t *testing.T) {
set, err := c.TraverseIterator(sID, iID, 1)
require.NoError(t, err)
require.Equal(t, 1, len(set))
assert.NoError(t, err)
assert.Equal(t, 1, len(set))
wg.Done()
}
for i := 0; i < storageItemsCount; i++ {
Expand Down

0 comments on commit 588d7c6

Please sign in to comment.