summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/tcp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocoltest/tcp.rb')
-rw-r--r--lib/custodian/protocoltest/tcp.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb
index a28ed33..30083cd 100644
--- a/lib/custodian/protocoltest/tcp.rb
+++ b/lib/custodian/protocoltest/tcp.rb
@@ -1,4 +1,5 @@
+require 'custodian/settings'
require 'custodian/testfactory'
require 'socket'
require 'timeout'
@@ -140,8 +141,15 @@ module Custodian
#
#
def run_test_internal( host, port, banner = nil, do_read = true )
+
+ #
+ # Get the timeout period for this test.
+ #
+ settings = Custodian::Settings.instance()
+ period = settings.timeout()
+
begin
- timeout(30) do
+ timeout(period) do
begin
socket = TCPSocket.new( host, port )