mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-06 00:02:08 -04:00
12 lines
300 B
Ruby
12 lines
300 B
Ruby
module TimeoutForTest
|
|
# our own subclass so we never confused different timeouts
|
|
class TestTimeout < Timeout::Error
|
|
end
|
|
|
|
def run(*)
|
|
::Timeout.timeout(RUBY_ENGINE == "jruby" ? 60 : 30, TestTimeout) { super }
|
|
end
|
|
end
|
|
|
|
Minitest::Test.prepend(TimeoutForTest) unless ENV.key?("HTTPX_DEBUG")
|