From 50258929ac9287f7d06dc132a89ba4e72e2ef92a Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Wed, 23 Sep 2015 09:24:50 +0100 Subject: [PATCH] Retrieval: Show error message for failed test scrape This is flaky, and I suspect it was due the to I/O timeout that I've already fixed. In case that wasn't it, display the error should it happen again. --- retrieval/target_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/retrieval/target_test.go b/retrieval/target_test.go index 4550a5621..a64c9ac53 100644 --- a/retrieval/target_test.go +++ b/retrieval/target_test.go @@ -195,7 +195,9 @@ func TestTargetScrapeMetricRelabelConfigs(t *testing.T) { } appender := &collectResultAppender{} - testTarget.scrape(appender) + if err := testTarget.scrape(appender); err != nil { + t.Fatal(err) + } // Remove variables part of result. for _, sample := range appender.result {