Merge pull request #3344 from nspcc-dev/concurrent-test

rpcsrv: fix concurrent test TestClient_IteratorSessions
This commit is contained in:
Anna Shaleva 2024-03-12 00:04:31 +03:00 committed by GitHub
commit b12ef701f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1425,7 +1425,7 @@ func TestClient_NNS(t *testing.T) {
func TestClient_IteratorSessions(t *testing.T) { func TestClient_IteratorSessions(t *testing.T) {
_, rpcSrv, httpSrv := initServerWithInMemoryChain(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, err)
require.NoError(t, c.Init()) require.NoError(t, c.Init())
@ -1509,8 +1509,8 @@ func TestClient_IteratorSessions(t *testing.T) {
wg.Add(storageItemsCount) wg.Add(storageItemsCount)
check := func(t *testing.T) { check := func(t *testing.T) {
set, err := c.TraverseIterator(sID, iID, 1) set, err := c.TraverseIterator(sID, iID, 1)
require.NoError(t, err) assert.NoError(t, err)
require.Equal(t, 1, len(set)) assert.Equal(t, 1, len(set))
wg.Done() wg.Done()
} }
for i := 0; i < storageItemsCount; i++ { for i := 0; i < storageItemsCount; i++ {