Commit 8bfde94a authored by Mikio Hara's avatar Mikio Hara

netutil: deflake TestLimitListener (again)

This change adds missing accept-queue length check.

Change-Id: Ifefc5c614a1a34af51411976ced096c55b95fb8f
Reviewed-on: https://go-review.googlesource.com/11536Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent af03a19e
......@@ -27,6 +27,9 @@ import (
func TestLimitListener(t *testing.T) {
const max = 5
attempts := (nettest.MaxOpenFiles() - max) / 2
if attempts > 256 { // maximum length of accept queue is 128 by default
attempts = 256
}
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment