Skip to content

Commit

Permalink
Add timeout to checkin scheduler spec (#1331)
Browse files Browse the repository at this point in the history
There are times the spec runs for hours (6 hours on the CI) and that's
very wasteful. If it's stuck after 5 minutes it's not getting unstuck so
let's time it out.

[skip review]
[skip changeset]
  • Loading branch information
tombruijn authored Nov 11, 2024
1 parent 6deb83a commit 026bb53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/lib/appsignal/check_in/scheduler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
end
end

around do |example|
Timeout.timeout(5 * 60) do # in seconds
example.run
end
end

describe "when no event is sent" do
it "does not start a thread" do
expect(scheduler.thread).to be_nil
Expand Down

0 comments on commit 026bb53

Please sign in to comment.