• Russ Cox's avatar
    crypto/tls: deflake localPipe in tests · 623d653d
    Russ Cox authored
    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: default avatarBryan C. Mills <bcmills@google.com>
    623d653d
handshake_test.go 23.4 KB