File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,8 @@ TEST_CASE("span rule limiter") {
307307
308308 auto finalized = finalize_config (config);
309309 REQUIRE (finalized);
310- Tracer tracer{*finalized};
310+ auto clock = [frozen_time = default_clock ()]() { return frozen_time; };
311+ Tracer tracer{*finalized, clock};
311312
312313 for (std::size_t i = 0 ; i < test_case.num_spans ; ++i) {
313314 auto span = tracer.create_span ();
@@ -326,10 +327,5 @@ TEST_CASE("span rule limiter") {
326327 }
327328 }
328329
329- // The `TestCase` that expects 100 span allowed once failed because 101 were
330- // allowed. I'm not sure how that works, but we are using a real clock and
331- // different machines run these cases at different rates, so let's build in a
332- // fudge factor.
333- REQUIRE (count_of_sampled_spans >= test_case.expected_count - 10 );
334- REQUIRE (count_of_sampled_spans <= test_case.expected_count + 10 );
330+ REQUIRE (count_of_sampled_spans == test_case.expected_count );
335331}
You can’t perform that action at this time.
0 commit comments