]> Cypherpunks.ru repositories - gostls13.git/commitdiff
net/http: skip TestClientTimeout_h{1,2} on windows/arm and windows/arm64
authorBryan C. Mills <bcmills@google.com>
Wed, 5 Jan 2022 19:20:30 +0000 (14:20 -0500)
committerBryan Mills <bcmills@google.com>
Wed, 5 Jan 2022 21:11:50 +0000 (21:11 +0000)
These tests are empirically flaky on the windows/arm and windows/arm64
builders, with a consistent (but rare) failure mode.

This change skips the test if that particular failure mode is
encountered on those platforms; the skip can be removed if and when
someone has the time to pin down the root cause.

For #43120

Change-Id: Ie3a9a06bf47e3a907c7b07441acc1494a4631135
Reviewed-on: https://go-review.googlesource.com/c/go/+/375635
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/net/http/client_test.go

index c2ea6f43304037f17c6bc52ae572e75177437c13..ea59f68f35f6b4813d803066710ec82720fe8656 100644 (file)
@@ -13,6 +13,7 @@ import (
        "encoding/base64"
        "errors"
        "fmt"
+       "internal/testenv"
        "io"
        "log"
        "net"
@@ -21,6 +22,7 @@ import (
        "net/http/httptest"
        "net/url"
        "reflect"
+       "runtime"
        "strconv"
        "strings"
        "sync"
@@ -1289,6 +1291,9 @@ func testClientTimeout(t *testing.T, h2 bool) {
                        t.Errorf("net.Error.Timeout = false; want true")
                }
                if got := ne.Error(); !strings.Contains(got, "(Client.Timeout") {
+                       if runtime.GOOS == "windows" && strings.HasPrefix(runtime.GOARCH, "arm") {
+                               testenv.SkipFlaky(t, 43120)
+                       }
                        t.Errorf("error string = %q; missing timeout substring", got)
                }