summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocoltest/http.rb')
-rw-r--r--lib/custodian/protocoltest/http.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb
index 0450753..c52e36c 100644
--- a/lib/custodian/protocoltest/http.rb
+++ b/lib/custodian/protocoltest/http.rb
@@ -1,3 +1,5 @@
+
+require 'custodian/settings'
require 'uri'
@@ -183,8 +185,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(@url)
@@ -198,7 +206,7 @@ module Custodian
c.ssl_verify_host = false
c.ssl_verify_peer = false
- c.timeout = 20
+ c.timeout = period
c.perform
@status = c.response_code
@content = c.body_str