From b12b914017a1567b16ef6f5d3c45a8924222d39a Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Tue, 4 Jul 2017 11:01:56 +0200 Subject: [PATCH] agent: fix TestCheckHTTP_TLSSkipVerify_true_pass Make check timing less aggressive and give the test some time to execute. --- agent/check_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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") }