Compare commits

..

1 commit

Author SHA1 Message Date
3bae770c93 [#326] pool: Add test for concurrent client deletion
All checks were successful
DCO / DCO (pull_request) Successful in 28s
Code generation / Generate proto (pull_request) Successful in 34s
Tests and linters / Tests (pull_request) Successful in 47s
Tests and linters / Lint (pull_request) Successful in 2m16s
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-01-29 20:15:03 +03:00

View file

@ -421,15 +421,14 @@ func TestDeleteClientTwice(t *testing.T) {
p := Pool{
clientMap: makeClientMap([]netmap.NodeInfo{netmaptest.NodeInfo()}),
}
// emulate concurrent requests as consecutive requests
// to delete the same client from the map twice
// emulate concurrent request as consecutive requests
// to delete the same client id from the map twice
for idToDelete := range p.clientMap {
p.deleteClientFromMap(idToDelete)
require.NotPanics(t, func() {
p.deleteClientFromMap(idToDelete)
})
}
require.Empty(t, p.clientMap)
}
func makeInnerPool(nodes [][]string) []*innerPool {