From 3a3079d8ed80e9fc844834eca228b131f43725a8 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Wed, 25 Apr 2018 11:02:52 -0700 Subject: [PATCH] Fix assertions in metrics_compression test (#847) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #846 The proxy `metrics_compression` test contained an assertion that a compressed scrape contained the `request_duration_ms_count` metric. This was chosen completely arbitrarily, and was only intended as an assertion that metrics were updated between compressed scrapes. Unfortunately, that metric was removed in d9112abc933035ba48eabc1e9e5a81b4da0e367f, so when #665 merged to master, this test broke. CI didn't catch this since we don't build merges for PRs --- we should probably (re)enable this in Travis? This PR fixes the test to assert on a metric that wasn't removed. Sorry for the ❌s! --- proxy/tests/telemetry.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/tests/telemetry.rs b/proxy/tests/telemetry.rs index 8736e3ca7..7907a1b21 100644 --- a/proxy/tests/telemetry.rs +++ b/proxy/tests/telemetry.rs @@ -1148,7 +1148,7 @@ fn metrics_compression() { for &encoding in encodings { assert_contains!(do_scrape(encoding), - "request_duration_ms_count{authority=\"tele.test.svc.cluster.local\",direction=\"inbound\"} 1"); + "response_latency_ms_count{authority=\"tele.test.svc.cluster.local\",direction=\"inbound\",classification=\"success\",status_code=\"200\"} 1"); } info!("client.get(/)"); @@ -1156,6 +1156,6 @@ fn metrics_compression() { for &encoding in encodings { assert_contains!(do_scrape(encoding), - "request_duration_ms_count{authority=\"tele.test.svc.cluster.local\",direction=\"inbound\"} 2"); + "response_latency_ms_count{authority=\"tele.test.svc.cluster.local\",direction=\"inbound\",classification=\"success\",status_code=\"200\"} 2"); } }