From d5cec388452433938efda7023f16bf94a6784bdf Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 7 Jun 2019 17:09:25 +0000 Subject: [PATCH] http2: disable a flaky test on Windows for now, add more logging Updates golang/go#31260 Change-Id: Icf26461dc48f5f16a91a93df6aa78fec1338f51f Reviewed-on: https://go-review.googlesource.com/c/net/+/181198 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Bryan C. Mills --- http2/transport_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/http2/transport_test.go b/http2/transport_test.go index 567eb746..d90fa121 100644 --- a/http2/transport_test.go +++ b/http2/transport_test.go @@ -4230,6 +4230,14 @@ func (r *errReader) Read(p []byte) (int, error) { } func testTransportBodyReadError(t *testing.T, body []byte) { + if runtime.GOOS == "windows" { + // So far we've only seen this be flaky on Windows, + // perhaps due to TCP behavior on shutdowns while + // unread data is in flight. This test should be + // fixed, but a skip is better than annoying people + // for now. + t.Skip("skipping flaky test on Windows; https://golang.org/issue/31260") + } clientDone := make(chan struct{}) ct := newClientTester(t) ct.client = func() error { @@ -4276,6 +4284,7 @@ func testTransportBodyReadError(t *testing.T, body []byte) { var resetCount int for { f, err := ct.fr.ReadFrame() + t.Logf("server: ReadFrame = %v, %v", f, err) if err != nil { select { case <-clientDone: @@ -4283,7 +4292,7 @@ func testTransportBodyReadError(t *testing.T, body []byte) { // will have reported any // errors on its side. if bytes.Compare(receivedBody, body) != 0 { - return fmt.Errorf("body: %v; expected %v", receivedBody, body) + return fmt.Errorf("body: %q; expected %q", receivedBody, body) } if resetCount != 1 { return fmt.Errorf("stream reset count: %v; expected: 1", resetCount)