Browse Source

http2: skip OS-dependent tests on Plan 9

In x/net/http2, tests TestServer_RejectsLargeFrames and
TestTransportBodyReadError_* are disabled on Windows because
they fail or flake, being dependent on the behaviour of the
OS network implementation when a connection is closed during
a large write.

The tests fail on Plan 9 for the same reason, so they should be
disabled there as well.

Workaround for golang/go#31260

Fixes golang/go#37321

Change-Id: Ifa1766eaa515c419fc4192126aaf796beefead0a
Reviewed-on: https://go-review.googlesource.com/c/net/+/231877
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Richard Miller 5 years ago
parent
commit
d87ec0cfa4
2 changed files with 5 additions and 5 deletions
  1. 2 2
      http2/server_test.go
  2. 3 3
      http2/transport_test.go

+ 2 - 2
http2/server_test.go

@@ -1189,8 +1189,8 @@ func TestServer_MaxQueuedControlFrames(t *testing.T) {
 }
 }
 
 
 func TestServer_RejectsLargeFrames(t *testing.T) {
 func TestServer_RejectsLargeFrames(t *testing.T) {
-	if runtime.GOOS == "windows" {
-		t.Skip("see golang.org/issue/13434")
+	if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
+		t.Skip("see golang.org/issue/13434, golang.org/issue/37321")
 	}
 	}
 
 
 	st := newServerTester(t, nil)
 	st := newServerTester(t, nil)

+ 3 - 3
http2/transport_test.go

@@ -4322,13 +4322,13 @@ func (r *errReader) Read(p []byte) (int, error) {
 }
 }
 
 
 func testTransportBodyReadError(t *testing.T, body []byte) {
 func testTransportBodyReadError(t *testing.T, body []byte) {
-	if runtime.GOOS == "windows" {
-		// So far we've only seen this be flaky on Windows,
+	if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
+		// So far we've only seen this be flaky on Windows and Plan 9,
 		// perhaps due to TCP behavior on shutdowns while
 		// perhaps due to TCP behavior on shutdowns while
 		// unread data is in flight. This test should be
 		// unread data is in flight. This test should be
 		// fixed, but a skip is better than annoying people
 		// fixed, but a skip is better than annoying people
 		// for now.
 		// for now.
-		t.Skip("skipping flaky test on Windows; https://golang.org/issue/31260")
+		t.Skipf("skipping flaky test on %s; https://golang.org/issue/31260", runtime.GOOS)
 	}
 	}
 	clientDone := make(chan struct{})
 	clientDone := make(chan struct{})
 	ct := newClientTester(t)
 	ct := newClientTester(t)