net/http: unflake TestTimeoutHandlerSuperfluousLogs
Uses 2 channels to synchronize that test, because relying on sleeps creates flaky behavior, thus: a) 1 buffered channel to send back the last spurious line without having to reason about "happens before" behavior a) 1 buffered channel at the end of the handler; it'll be controlled by whether we expect to timeout or not, but will always be closed when the test ends Fixes #35051 Change-Id: Iff735aa8d1ed9de8d92b792374ec161cc0a72798 Reviewed-on: https://go-review.googlesource.com/c/go/+/208477 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Showing
Please register or sign in to comment