mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Add 60 second timeout to all test cases (#1141)
This commit is contained in:
parent
e7f7d61b13
commit
04533503ce
1 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
# Copyright (c) 2011 Evan Phoenix
|
||||
# Copyright (c) 2005 Zed A. Shaw
|
||||
# Copyright (c) 2005 Zed A. Shaw
|
||||
|
||||
require 'rubygems'
|
||||
require 'test/unit'
|
||||
|
@ -30,3 +30,14 @@ def hit(uris)
|
|||
|
||||
return results
|
||||
end
|
||||
|
||||
module TimeoutEveryTestCase
|
||||
def run(*args)
|
||||
if !!ENV['CI']
|
||||
Timeout.timeout(60) { super }
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
Test::Unit::TestCase.prepend TimeoutEveryTestCase
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue