1
0
Fork 0
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:
Nate Berkopec 2016-11-20 10:20:58 -07:00 committed by GitHub
parent e7f7d61b13
commit 04533503ce

View file

@ -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