diff --git a/spec/datadog/profiling/collectors/cpu_and_wall_time_worker_spec.rb b/spec/datadog/profiling/collectors/cpu_and_wall_time_worker_spec.rb index c39971c3f23..b93765fbecb 100644 --- a/spec/datadog/profiling/collectors/cpu_and_wall_time_worker_spec.rb +++ b/spec/datadog/profiling/collectors/cpu_and_wall_time_worker_spec.rb @@ -155,8 +155,11 @@ it do expect(Datadog.logger).to receive(:warn).with(/GVL profiling is not supported/) + proc_called = Queue.new - cpu_and_wall_time_worker.start + cpu_and_wall_time_worker.start(on_failure_proc: proc { proc_called << true }) + + proc_called.pop end end