Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-10-28 03:36:14 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-10-28 03:53:39 +0300
commitcb3014332838953d6161e3d4ea948bf3580c5877 (patch)
treef22efdd4fa729f29e87d4c164facaa6c86eb482f
parent82897d44ba24025be92b99986abafac94770e679 (diff)
Add short timeout to test
-rw-r--r--internal/httptransport/transport_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/httptransport/transport_test.go b/internal/httptransport/transport_test.go
index 47167a75..9059ea15 100644
--- a/internal/httptransport/transport_test.go
+++ b/internal/httptransport/transport_test.go
@@ -51,10 +51,11 @@ func Test_withRoundTripper(t *testing.T) {
res: &http.Response{
StatusCode: tt.statusCode,
},
- err: tt.err,
+ err: tt.err,
+ timeout: time.Nanosecond,
}
- mtr := &meteredRoundTripper{next: next, durations: histVec, counter: counterVec}
+ mtr := &meteredRoundTripper{next: next, durations: histVec, counter: counterVec, ttfbTimeout: DefaultTTFBTimeout}
r := httptest.NewRequest("GET", "/", nil)
res, err := mtr.RoundTrip(r)