@@ -1019,7 +1019,7 @@ func TestClient_GetCaURL(t *testing.T) {
10191019
10201020func TestClient_WithTimeout (t * testing.T ) {
10211021 srv := httptest .NewServer (http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
1022- time .Sleep (100 * time .Millisecond )
1022+ time .Sleep (200 * time .Millisecond )
10231023 render .JSONStatus (w , r , api.HealthResponse {Status : "ok" }, 200 )
10241024 }))
10251025 defer srv .Close ()
@@ -1030,8 +1030,8 @@ func TestClient_WithTimeout(t *testing.T) {
10301030 assertion assert.ErrorAssertionFunc
10311031 }{
10321032 {"ok" , []ClientOption {WithTransport (http .DefaultTransport )}, assert .NoError },
1033- {"ok with timeout" , []ClientOption {WithTransport (http .DefaultTransport ), WithTimeout (time .Second )}, assert .NoError },
1034- {"fail with timeout" , []ClientOption {WithTransport (http .DefaultTransport ), WithTimeout (100 * time .Millisecond )}, assert .Error },
1033+ {"ok with timeout" , []ClientOption {WithTransport (http .DefaultTransport ), WithTimeout (5 * time .Second )}, assert .NoError },
1034+ {"fail with timeout" , []ClientOption {WithTransport (http .DefaultTransport ), WithTimeout (10 * time .Millisecond )}, assert .Error },
10351035 }
10361036
10371037 for _ , tt := range tests {
0 commit comments