Przeglądaj źródła

http2: speed up TestTransportFlowControl in short mode

Updates golang/go#18273

Change-Id: I2e7589d070a2953972bc8456d572edd616525266
Reviewed-on: https://go-review.googlesource.com/34271
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
Brad Fitzpatrick 9 lat temu
rodzic
commit
b1a2d6e8c8
1 zmienionych plików z 5 dodań i 4 usunięć
  1. 5 4
      http2/transport_test.go

+ 5 - 4
http2/transport_test.go

@@ -2073,10 +2073,11 @@ func TestTransportHandlerBodyClose(t *testing.T) {
 
 // https://golang.org/issue/15930
 func TestTransportFlowControl(t *testing.T) {
-	const (
-		total  = 100 << 20 // 100MB
-		bufLen = 1 << 16
-	)
+	const bufLen = 64 << 10
+	var total int64 = 100 << 20 // 100MB
+	if testing.Short() {
+		total = 10 << 20
+	}
 
 	var wrote int64 // updated atomically
 	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {