]> Cypherpunks repositories - gostls13.git/commit
net: convert TestTCPServer to use subtests
authorBryan C. Mills <bcmills@google.com>
Tue, 22 Oct 2019 16:44:44 +0000 (12:44 -0400)
committerBryan C. Mills <bcmills@google.com>
Tue, 22 Oct 2019 17:34:15 +0000 (17:34 +0000)
commit22278ca0d4f0ecdc5e9d2884b771062cbb3e837a
tree7397c5228f9d0b0cf1e2670202a374410da14944
parent51504f0a2d65a7f7fcf63c25c2cb306a6863d07d
net: convert TestTCPServer to use subtests

My fix in CL 202618 inadvertently violated an invariant in the inner
loop of TestTCPServer (namely, that len(trchs) == i). That causes a
panic when one or more of the channels is omitted due to a flake.

Instead of trying to fix up the test, let's just factor out a subtest
and skip the whole thing if the transceiver's Dial flakes out.

Updates #32919

Change-Id: Ib6f274a44194311c8c5a2faf19f586cc9eccfd4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/202561
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/server_test.go