Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ekump committed Oct 26, 2023
1 parent aba1ffd commit 6cbcd52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/datadog/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ def wait_for_tracer_sent
end

context 'for threads' do
let(:original_threads) { Thread.list }
let!(:original_threads) { Thread.list }
let(:start_tracer) do
Datadog::Tracing.trace('test.op') {}

new_threads = Thread.list - original_threads
tracer_threads.concat(new_threads.map(&:object_id))
tracer_threads.concat(new_threads)
end
let(:tracer_threads) { [] }

Expand All @@ -43,10 +43,10 @@ def inspect_threads(threads)

shutdown

post_shutdown_threads = Thread.list.map(&:object_id)
post_shutdown_threads = Thread.list

expect(post_shutdown_threads & tracer_threads).to be_empty,
"Tracer threads not terminated: #{inspect_threads(Thread.list)}"
"Tracer threads not terminated: #{inspect_threads(post_shutdown_threads)}"
end
end

Expand Down

0 comments on commit 6cbcd52

Please sign in to comment.