]> Cypherpunks repositories - gostls13.git/commit
net: fix flaky *TimeoutMustNotReturn tests
authorDmitri Goutnik <dgoutnik@gmail.com>
Fri, 17 Jun 2022 17:10:09 +0000 (12:10 -0500)
committerDamien Neil <dneil@google.com>
Fri, 17 Jun 2022 21:21:26 +0000 (21:21 +0000)
commitdd2d00f9d57ba6aafb084d83ffc7fb35f97b8c84
treec093d5067e1df8f0c9ee946840b51d6ab8a64605
parent6c25ba624fd032a20dcfa94f9f9f0ae32c57c54b
net: fix flaky *TimeoutMustNotReturn tests

The tester goroutine doesn't always gets a chance to run before the
timeout expires. Wait for the goroutine to start and set deadlines
before staring the timer.

Fixes #36796

Change-Id: Iffed6259de31340c3f66e34da473826a1d09fcde
Reviewed-on: https://go-review.googlesource.com/c/go/+/412858
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/net/timeout_test.go