Skip to content

Commit b65035b

Browse files
committed
Cleanup deprecated timeout setter for HTTP client
1 parent 752077a commit b65035b

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

rb/lib/selenium/webdriver/remote/http/default.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ def initialize(open_timeout: nil, read_timeout: nil)
4141
@read_timeout = read_timeout
4242
end
4343

44-
# Maintaining backward compatibility.
45-
# @param [Numeric] value - Timeout in seconds to apply to both open timeout and read timeouts.
46-
# @deprecated Please set the specific desired timeout {#read_timeout} or {#open_timeout} directly.
47-
def timeout=(value)
48-
WebDriver.logger.deprecate ':timeout=', '#read_timeout= and #open_timeout='
49-
self.open_timeout = value
50-
self.read_timeout = value
51-
end
52-
5344
def close
5445
@http&.finish
5546
end

rb/spec/unit/selenium/webdriver/remote/http/default_spec.rb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,6 @@ module Http
5050
end
5151
end
5252

53-
describe '#timeout=' do
54-
let(:value_set) { 22 }
55-
56-
it 'assigns value to #read_timeout' do
57-
expect { client.timeout = value_set }.to output.to_stdout_from_any_process
58-
expect(client.read_timeout).to eq value_set
59-
end
60-
61-
it 'assigns value to #open_timeout' do
62-
expect { client.timeout = value_set }.to output.to_stdout_from_any_process
63-
expect(client.open_timeout).to eq value_set
64-
end
65-
end
66-
67-
it 'uses the specified timeout' do
68-
expect { client.timeout = 10 }.to output.to_stdout_from_any_process
69-
http = client.send :http
70-
71-
expect(http.open_timeout).to eq(10)
72-
expect(http.read_timeout).to eq(10)
73-
end
74-
7553
it 'uses the specified proxy' do
7654
client.proxy = Proxy.new(http: 'http://foo:[email protected]:8080')
7755
http = client.send :http

0 commit comments

Comments
 (0)