From 075f45d251e2872fe8a9d94fdd1b9d77db4ac010 Mon Sep 17 00:00:00 2001 From: Ehsan Saei <71217171+esigo@users.noreply.github.com> Date: Wed, 1 Mar 2023 20:28:37 +0100 Subject: [PATCH] fix Prometheus test iterator increment (#2006) --- exporters/prometheus/test/exporter_utils_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exporters/prometheus/test/exporter_utils_test.cc b/exporters/prometheus/test/exporter_utils_test.cc index 467525ff7d..2b37ab77ad 100644 --- a/exporters/prometheus/test/exporter_utils_test.cc +++ b/exporters/prometheus/test/exporter_utils_test.cc @@ -65,12 +65,12 @@ void assert_histogram(prometheus_client::MetricFamily &metric, int cumulative_count = 0; auto buckets = metric.metric[0].histogram.bucket; auto boundary_it = boundaries.cbegin(); - for (size_t i = 0; i < buckets.size(); i++, ++boundary_it) + for (size_t i = 0; i < buckets.size(); i++) { auto bucket = buckets[i]; if (i != buckets.size() - 1) { - ASSERT_DOUBLE_EQ(*boundary_it, bucket.upper_bound); + ASSERT_DOUBLE_EQ(*boundary_it++, bucket.upper_bound); } else {