Compare commits
1 commit
3bae770c93
...
2786fadb25
Author | SHA1 | Date | |
---|---|---|---|
2786fadb25 |
1 changed files with 3 additions and 2 deletions
|
@ -421,14 +421,15 @@ func TestDeleteClientTwice(t *testing.T) {
|
||||||
p := Pool{
|
p := Pool{
|
||||||
clientMap: makeClientMap([]netmap.NodeInfo{netmaptest.NodeInfo()}),
|
clientMap: makeClientMap([]netmap.NodeInfo{netmaptest.NodeInfo()}),
|
||||||
}
|
}
|
||||||
// emulate concurrent request as consecutive requests
|
// emulate concurrent requests as consecutive requests
|
||||||
// to delete the same client id from the map twice
|
// to delete the same client from the map twice
|
||||||
for idToDelete := range p.clientMap {
|
for idToDelete := range p.clientMap {
|
||||||
p.deleteClientFromMap(idToDelete)
|
p.deleteClientFromMap(idToDelete)
|
||||||
require.NotPanics(t, func() {
|
require.NotPanics(t, func() {
|
||||||
p.deleteClientFromMap(idToDelete)
|
p.deleteClientFromMap(idToDelete)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
require.Empty(t, p.clientMap)
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeInnerPool(nodes [][]string) []*innerPool {
|
func makeInnerPool(nodes [][]string) []*innerPool {
|
||||||
|
|
Loading…
Add table
Reference in a new issue