Commit b60ee497 authored by Dominik Charousset's avatar Dominik Charousset

Merge branch topic/neverlord/prometheus-unit-tests

parents 977f00bd 32fbd6ec
...@@ -65,13 +65,14 @@ some_request_duration_seconds_bucket{x="get",le="+Inf"} 3 42000 ...@@ -65,13 +65,14 @@ some_request_duration_seconds_bucket{x="get",le="+Inf"} 3 42000
some_request_duration_seconds_sum{x="get"} 14 42000 some_request_duration_seconds_sum{x="get"} 14 42000
some_request_duration_seconds_count{x="get"} 3 42000 some_request_duration_seconds_count{x="get"} 3 42000
)"_sv); )"_sv);
CAF_MESSAGE("multiple runs generate the same output"); CAF_MESSAGE("multiple runs with the same timestamp generate the same output");
auto ts = make_timestamp();
std::string res1; std::string res1;
{ {
auto buf = exporter.collect_from(registry); auto buf = exporter.collect_from(registry, ts);
res1.assign(buf.begin(), buf.end()); res1.assign(buf.begin(), buf.end());
} }
CAF_CHECK_EQUAL(res1, exporter.collect_from(registry)); CAF_CHECK_EQUAL(res1, exporter.collect_from(registry, ts));
} }
CAF_TEST_FIXTURE_SCOPE_END() CAF_TEST_FIXTURE_SCOPE_END()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment