skip the error log in TestAllocatePortInUse
We know we're going to see an error, so don't log it too: $ go test -run TestAllocatePortInUse 2019/02/21 17:11:34 ERROR: pool could not allocate runner ... PASS ok github.com/chromedp/chromedp 0.004s
This commit is contained in:
parent
da4f783362
commit
4c16288502
|
@ -24,7 +24,11 @@ func TestAllocatePortInUse(t *testing.T) {
|
|||
// make the pool use the port already in use via a port range
|
||||
_, portStr, _ := net.SplitHostPort(l.Addr().String())
|
||||
port, _ := strconv.Atoi(portStr)
|
||||
pool, err := NewPool(PortRange(port, port+1))
|
||||
pool, err := NewPool(
|
||||
PortRange(port, port+1),
|
||||
// skip the error log from the used port
|
||||
PoolLog(nil, nil, func(string, ...interface{}) {}),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user