diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-14 16:05:03 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-14 16:05:03 +0000 |
commit | dff1f98662289589ca6227bffa885f90b5773e62 (patch) | |
tree | ea4c7718d46e252d583dd37bdd0c502025ee8e27 /lib/custodian/protocol-tests/smtp.rb | |
parent | e880c1890738793d176c6d07e35666116fc34514 (diff) |
Updated each test to use the timeout period specified in the JSON
hash. Update the trivial test to set such a thing too.
Diffstat (limited to 'lib/custodian/protocol-tests/smtp.rb')
-rwxr-xr-x | lib/custodian/protocol-tests/smtp.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/custodian/protocol-tests/smtp.rb b/lib/custodian/protocol-tests/smtp.rb index 8ed19e8..340821c 100755 --- a/lib/custodian/protocol-tests/smtp.rb +++ b/lib/custodian/protocol-tests/smtp.rb @@ -74,7 +74,7 @@ class SMTPTest puts "SMTP testing host #{host}:#{port}" if ( @test_data['verbose'] ) begin - timeout(3) do + timeout(@test_data["timeout"]) do begin socket = TCPSocket.new( host, port ) @@ -129,7 +129,9 @@ if __FILE__ == $0 then test = { "target_host" => "mail.steve.org.uk", "test_type" => "smtp", + "test_port" => "25", "verbose" => 1, + "timeout" => 5, "test_alert" => "SMTP failure", } |