diff options
Diffstat (limited to 'lib/custodian/protocoltest/openproxy.rb')
-rw-r--r-- | lib/custodian/protocoltest/openproxy.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/custodian/protocoltest/openproxy.rb b/lib/custodian/protocoltest/openproxy.rb index cb4371d..5313343 100644 --- a/lib/custodian/protocoltest/openproxy.rb +++ b/lib/custodian/protocoltest/openproxy.rb @@ -1,3 +1,5 @@ + +require 'custodian/settings' require 'uri' @@ -75,8 +77,14 @@ module Custodian return false end + # + # Get the timeout period for this test. + # + settings = Custodian::Settings.instance() + period = settings.timeout() + begin - timeout( 20 ) do + timeout( period ) do begin c = Curl::Easy.new() c.follow_location = true @@ -86,7 +94,7 @@ module Custodian c.proxy_tunnel = true c.url = "http://google.com/" c.ssl_verify_peer = false - c.timeout = 20 + c.timeout = period c.perform @status = c.response_code @content = c.body_str |