Skip to content

Commit

Permalink
Merge pull request #2365 from MSP-Greg/test-timeout
Browse files Browse the repository at this point in the history
test/helper.rb -TimeoutEveryTestCase - set all timeouts to 45 sec [changelog skip]
  • Loading branch information
nateberkopec committed Sep 14, 2020
2 parents 5b56986 + 70f4685 commit 7b3c08a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/helper.rb
Expand Up @@ -65,15 +65,15 @@ def run
before_setup; setup; after_setup

# wrap timeout around test method only
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 60 : 120, TestTookTooLong) {
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 45 : 45, TestTookTooLong) {
self.send self.name
}
end

Minitest::Test::TEARDOWN_METHODS.each do |hook|
capture_exceptions do
# wrap timeout around teardown methods, remove when they're stable
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 60 : 120, TestTookTooLong) {
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 45 : 45, TestTookTooLong) {
self.send hook
}
end
Expand Down

0 comments on commit 7b3c08a

Please sign in to comment.