]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: deflake localPipe in tests
authorRuss Cox <rsc@golang.org>
Fri, 28 Jun 2019 00:54:14 +0000 (20:54 -0400)
committerRuss Cox <rsc@golang.org>
Sat, 29 Jun 2019 13:17:15 +0000 (13:17 +0000)
commit623d653db7cd2287305347196f7f4742b6b1fb38
tree70b992f0794932e7f4a8fe7d9ca8fe5dfd74e5c4
parent2e0cd2aef5924e48e1ceb74e3d52e76c56dd34cc
crypto/tls: deflake localPipe in tests

The localPipe implementation assumes that every successful net.Dial
results in exactly one successful listener.Accept. I don't believe this
is guaranteed by essentially any operating system. For this test, we're
seeing flakes on dragonfly (#29583).

But see also #19519, flakes due to the same assumption on FreeBSD
and macOS in package net's own tests.

This CL rewrites localPipe to try a few times to get a matching pair
of connections on the dial and accept side.

Fixes #29583.

Change-Id: Idb045b18c404eae457f091df20456c5ae879a291
Reviewed-on: https://go-review.googlesource.com/c/go/+/184157
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/crypto/tls/handshake_test.go