Skip to content

Commit

Permalink
net/http: deflake TestCancelRequestWithChannelBeforeDo_Cancel
Browse files Browse the repository at this point in the history
Goroutines clean up takes longer when using deprecated CloseNotifier.

Fixes #35122

Change-Id: Id820a3012b5c781ddfb294b38ee3b009624e398c
Reviewed-on: https://go-review.googlesource.com/c/go/+/204661
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
iwdgo authored and bradfitz committed Nov 2, 2019
1 parent dc39be8 commit 1e4a358
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/net/http/main_test.go
Expand Up @@ -122,7 +122,7 @@ func afterTest(t testing.TB) {
").noteClientGone(": "a closenotifier sender",
}
var stacks string
for i := 0; i < 4; i++ {
for i := 0; i < 10; i++ {
bad = ""
stacks = strings.Join(interestingGoroutines(), "\n\n")
for substr, what := range badSubstring {
Expand Down
4 changes: 0 additions & 4 deletions src/net/http/transport_test.go
Expand Up @@ -22,7 +22,6 @@ import (
"fmt"
"go/token"
"internal/nettrace"
"internal/testenv"
"io"
"io/ioutil"
"log"
Expand Down Expand Up @@ -2355,9 +2354,6 @@ func TestCancelRequestWithChannel(t *testing.T) {
}

func TestCancelRequestWithChannelBeforeDo_Cancel(t *testing.T) {
if os.Getenv("GO_BUILDER_NAME") == "windows-amd64-longtest" {
testenv.SkipFlaky(t, 35122)
}
testCancelRequestWithChannelBeforeDo(t, false)
}
func TestCancelRequestWithChannelBeforeDo_Context(t *testing.T) {
Expand Down

0 comments on commit 1e4a358

Please sign in to comment.