Fix conn_pool test, not covering multiplex channel.

This commit is contained in:
Chen Yufei
2013-10-31 20:47:13 +08:00
parent 2c90662986
commit 20637e9090

View File

@@ -7,7 +7,7 @@ import (
func TestGetFromEmptyPool(t *testing.T) {
// should not block
sv := connPool.Get("foo")
sv := connPool.Get("foo", true)
if sv != nil {
t.Error("get non nil server conn from empty conn pool")
}
@@ -41,7 +41,7 @@ func TestConnPool(t *testing.T) {
}
for _, td := range testData {
sv := connPool.Get(td.hostPort)
sv := connPool.Get(td.hostPort, true)
if td.found {
if sv == nil {
t.Error("should find conn for", td.hostPort)