Skip to content

Commit

Permalink
Try looping waiting for process to see if it's just a delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoanjo committed Jul 1, 2024
1 parent d367ebf commit f4ebb2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec/datadog/profiling/crashtracker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@
before do
skip_if_profiling_not_supported(self)

crash_tracker_pids = `pgrep -f libdatadog-crashtracking-receiver`
expect(crash_tracker_pids).to be_empty, "No crash tracker process should be running, found #{crash_tracker_pids}"
# No crash tracker process should still be running at the start of each testcase
wait_for { `pgrep -f libdatadog-crashtracking-receiver` }.to be_empty
end

after do
# No crash tracker process should still be running at the end of each testcase
wait_for { `pgrep -f libdatadog-crashtracking-receiver` }.to be_empty
end

let(:exporter_configuration) { [:agent, 'http://localhost:6006'] }
Expand Down

0 comments on commit f4ebb2d

Please sign in to comment.