Skip to content

Commit

Permalink
Cleanup deprecated timeout setter for HTTP client
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Apr 18, 2019
1 parent 752077a commit b65035b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
9 changes: 0 additions & 9 deletions rb/lib/selenium/webdriver/remote/http/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ def initialize(open_timeout: nil, read_timeout: nil)
@read_timeout = read_timeout
end

# Maintaining backward compatibility.
# @param [Numeric] value - Timeout in seconds to apply to both open timeout and read timeouts.
# @deprecated Please set the specific desired timeout {#read_timeout} or {#open_timeout} directly.
def timeout=(value)
WebDriver.logger.deprecate ':timeout=', '#read_timeout= and #open_timeout='
self.open_timeout = value
self.read_timeout = value
end

def close
@http&.finish
end
Expand Down
22 changes: 0 additions & 22 deletions rb/spec/unit/selenium/webdriver/remote/http/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@ module Http
end
end

describe '#timeout=' do
let(:value_set) { 22 }

it 'assigns value to #read_timeout' do
expect { client.timeout = value_set }.to output.to_stdout_from_any_process
expect(client.read_timeout).to eq value_set
end

it 'assigns value to #open_timeout' do
expect { client.timeout = value_set }.to output.to_stdout_from_any_process
expect(client.open_timeout).to eq value_set
end
end

it 'uses the specified timeout' do
expect { client.timeout = 10 }.to output.to_stdout_from_any_process
http = client.send :http

expect(http.open_timeout).to eq(10)
expect(http.read_timeout).to eq(10)
end

it 'uses the specified proxy' do
client.proxy = Proxy.new(http: 'http://foo:bar@proxy.org:8080')
http = client.send :http
Expand Down

0 comments on commit b65035b

Please sign in to comment.