Skip to content

Commit

Permalink
Fix spec assuming that allocation_counting_enabled defaults to true
Browse files Browse the repository at this point in the history
Unfortuantely on 3.x Rubies it needs to default to false.
  • Loading branch information
ivoanjo committed Feb 20, 2023
1 parent fa1849e commit 40100b6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions spec/datadog/core/configuration/components_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1097,12 +1097,18 @@
end
end

it 'initializes a CpuAndWallTimeWorker collector with allocation_counting_enabled set to true' do
expect(Datadog::Profiling::Collectors::CpuAndWallTimeWorker).to receive(:new).with hash_including(
allocation_counting_enabled: true,
)
context 'when allocation_counting_enabled is enabled' do
before do
settings.profiling.advanced.allocation_counting_enabled = true
end

build_profiler
it 'initializes a CpuAndWallTimeWorker collector with allocation_counting_enabled set to true' do
expect(Datadog::Profiling::Collectors::CpuAndWallTimeWorker).to receive(:new).with hash_including(
allocation_counting_enabled: true,
)

build_profiler
end
end

context 'when allocation_counting_enabled is disabled' do
Expand Down

0 comments on commit 40100b6

Please sign in to comment.