diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-10-28 03:36:14 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-10-28 03:53:39 +0300 |
commit | cb3014332838953d6161e3d4ea948bf3580c5877 (patch) | |
tree | f22efdd4fa729f29e87d4c164facaa6c86eb482f | |
parent | 82897d44ba24025be92b99986abafac94770e679 (diff) |
Add short timeout to test
-rw-r--r-- | internal/httptransport/transport_test.go | 5 |
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) |