File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
spec/datadog/profiling/collectors Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 13451345 end
13461346
13471347 it "returns different numbers of allocations for different threads" do
1348+ # GC disabled for the same reason as "returns the exact number of allocations between two calls of the method"
1349+ # spec above.
1350+ GC . disable
1351+
13481352 # To get the exact expected number of allocations, we run this once before so that Ruby can create and cache all
13491353 # it needs to
13501354 new_object = proc { Object . new }
13741378 # This test checks that even though we observed 100 allocations in a background thread t1, the counters for
13751379 # the current thread were not affected by this change
13761380
1377- expect ( after_t1 - before_t1 ) . to be 100
1381+ expect ( after_t1 - before_t1 ) . to be >= 100
13781382 expect ( after_allocations - before_allocations ) . to be < 10
1383+ ensure
1384+ GC . enable
13791385 end
13801386
13811387 context "when allocation profiling is enabled but allocation counting is disabled" do
You can’t perform that action at this time.
0 commit comments