diff options
author | Mikio Hara <mikioh.mikioh@gmail.com> | 2015-06-26 14:48:54 +0900 |
---|---|---|
committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2015-06-27 00:13:35 +0000 |
commit | 8bfde94a845cb31000de3266ac83edbda58dab09 (patch) | |
tree | 24327f9561a2853e11b5fd683ac01e6d17c26649 | |
parent | af03a19e5e18af95235c84e92e6670fdeb0b220a (diff) | |
download | net-8bfde94a845cb31000de3266ac83edbda58dab09.tar.gz |
netutil: deflake TestLimitListener (again)
This change adds missing accept-queue length check.
Change-Id: Ifefc5c614a1a34af51411976ced096c55b95fb8f
Reviewed-on: https://go-review.googlesource.com/11536
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r-- | netutil/listen_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/netutil/listen_test.go b/netutil/listen_test.go index 7179907..c0d5bc2 100644 --- a/netutil/listen_test.go +++ b/netutil/listen_test.go @@ -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 { |