• Brad Fitzpatrick's avatar
    net/http: fix now-flaky TransportAndServerSharedBodyRace test · 1bab3a16
    Brad Fitzpatrick authored
    TestTransportAndServerSharedBodyRace got flaky after
    issue #9662 was fixed by https://golang.org/cl/11412, which made
    servers hang up on clients when a Handler stopped reading its body
    early.
    
    This test was affected by a race between the the two goroutines in the
    test both only reading part of the request, which was an unnecessary
    detail for what the test was trying to test (concurrent Read/Close
    races on an *http.body)
    
    Also remove an unused remnant from an old test from which this one was
    derived. And make the test not deadlock when it fails. (which was why
    the test was showing up as 2m timeouts on the dashboard)
    
    Fixes #11418
    
    Change-Id: Ic83d18aef7e09a9cd56ac15e22ebed75713026cb
    Reviewed-on: https://go-review.googlesource.com/11610
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    1bab3a16
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...