From d79ae4ea556e3de2dc5629e7272b2755d216fd31 Mon Sep 17 00:00:00 2001 From: Pierre Fersing Date: Mon, 29 Feb 2016 22:02:33 +0100 Subject: [PATCH] Fix test closes #771 --- CHANGELOG.md | 1 + plugins/inputs/elasticsearch/elasticsearch_test.go | 3 +++ plugins/inputs/mysql/mysql_test.go | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72300f6da..74e211fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Features - [#692](https://github.com/influxdata/telegraf/pull/770): Support InfluxDB retention policies +- [#771](https://github.com/influxdata/telegraf/pull/771): Default timeouts for input plugns. Thanks @PierreF! ### Bugfixes - [#748](https://github.com/influxdata/telegraf/issues/748): Fix sensor plugin split on ":" diff --git a/plugins/inputs/elasticsearch/elasticsearch_test.go b/plugins/inputs/elasticsearch/elasticsearch_test.go index f94d3f9ac..f29857507 100644 --- a/plugins/inputs/elasticsearch/elasticsearch_test.go +++ b/plugins/inputs/elasticsearch/elasticsearch_test.go @@ -34,6 +34,9 @@ func (t *transportMock) RoundTrip(r *http.Request) (*http.Response, error) { return res, nil } +func (t *transportMock) CancelRequest(_ *http.Request) { +} + func TestElasticsearch(t *testing.T) { es := NewElasticsearch() es.Servers = []string{"http://example.com:9200"} diff --git a/plugins/inputs/mysql/mysql_test.go b/plugins/inputs/mysql/mysql_test.go index 50c1ed7b7..9e4073432 100644 --- a/plugins/inputs/mysql/mysql_test.go +++ b/plugins/inputs/mysql/mysql_test.go @@ -92,7 +92,7 @@ func TestMysqlDNSAddTimeout(t *testing.T) { }{ { "", - "/?timeout=5", + "/?timeout=5s", }, { "tcp(192.168.1.1:3306)/",