diff --git a/agent/check_test.go b/agent/check_test.go index 4416d7c876..649104426d 100644 --- a/agent/check_test.go +++ b/agent/check_test.go @@ -371,7 +371,7 @@ func TestCheckHTTP_TLSSkipVerify_true_pass(t *testing.T) { Notify: notif, CheckID: types.CheckID("skipverify_true"), HTTP: server.URL, - Interval: 5 * time.Millisecond, + Interval: 25 * time.Millisecond, Logger: log.New(ioutil.Discard, UniqueID(), log.LstdFlags), TLSSkipVerify: true, } @@ -379,6 +379,9 @@ func TestCheckHTTP_TLSSkipVerify_true_pass(t *testing.T) { check.Start() defer check.Stop() + // give check some time to execute + time.Sleep(200 * time.Millisecond) + if !check.httpClient.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify { t.Fatalf("should be true") }