Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bugfix for default connection timeout. Closes #3

  • Loading branch information...
commit 7cd0a3088676a698d7b1b3c7d68a5c6e77c1d269 1 parent 3f40091
@bmaland bmaland authored
Showing with 5 additions and 1 deletion.
  1. +1 −1  lib/studio_api/connection.rb
  2. +4 −0 test/connection_test.rb
View
2  lib/studio_api/connection.rb
@@ -63,7 +63,7 @@ def initialize(user, password, uri, options={})
@password = password
self.uri = uri
self.proxy = options[:proxy] #nil as default is OK
- @timeout = options[:timeout].to_i || 45
+ @timeout = (options[:timeout] || 45).to_i
@ssl = options[:ssl] || { :verify_mode => OpenSSL::SSL::VERIFY_NONE } # don't verify as default
end
View
4 test/connection_test.rb
@@ -18,4 +18,8 @@ def test_api_version
@connection.api_version #test caching, if it again call, then mocha raise exception
end
+ def test_default_timeout
+ assert_equal 45, @connection.timeout
+ end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.