Skip to content

Commit f4ebb2d

Browse files
committed
Try looping waiting for process to see if it's just a delay
1 parent d367ebf commit f4ebb2d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: spec/datadog/profiling/crashtracker_spec.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@
88
before do
99
skip_if_profiling_not_supported(self)
1010

11-
crash_tracker_pids = `pgrep -f libdatadog-crashtracking-receiver`
12-
expect(crash_tracker_pids).to be_empty, "No crash tracker process should be running, found #{crash_tracker_pids}"
11+
# No crash tracker process should still be running at the start of each testcase
12+
wait_for { `pgrep -f libdatadog-crashtracking-receiver` }.to be_empty
13+
end
14+
15+
after do
16+
# No crash tracker process should still be running at the end of each testcase
17+
wait_for { `pgrep -f libdatadog-crashtracking-receiver` }.to be_empty
1318
end
1419

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

0 commit comments

Comments
 (0)