-
-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Description
1 版本v1.0.0
TestPool_Get 测试方法中
_, err = p.Get()
if err != ErrMaxActiveConnReached {
t.Errorf("Get error: %s", err)
}
Get方法实现中
c.mu.Lock()
log.Debugf("openConn %v %v", c.openingConns, c.maxActive)
if c.openingConns >= c.maxActive {
req := make(chan connReq, 1)
c.connReqs = append(c.connReqs, req)
c.mu.Unlock()
ret, ok := <-req
if !ok {
return nil, ErrMaxActiveConnReached
}
ret, ok := <-req
目前在没有Put方法的情况下将永远阻塞 导致该测试无法完成
Metadata
Metadata
Assignees
Labels
No labels