Skip to content

Commit c3f1aa6

Browse files
committed
Address some linter warnings
Let's not split this central method.
1 parent 175b169 commit c3f1aa6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/influxdb/client/http.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def post(url, data)
4040

4141
private
4242

43+
# rubocop:disable Metrics/CyclomaticComplexity
44+
# rubocop:disable Metrics/PerceivedComplexity
4345
def connect_with_retry
4446
delay = config.initial_delay
4547
retry_count = 0
@@ -71,6 +73,8 @@ def connect_with_retry
7173
retry
7274
end
7375
end
76+
# rubocop:enable Metrics/CyclomaticComplexity
77+
# rubocop:enable Metrics/PerceivedComplexity
7478

7579
def do_request(http, req, data = nil)
7680
req.basic_auth config.username, config.password if basic_auth?

spec/influxdb/client_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
raise SocketError, "simulate getaddrinfo error"
4848
end
4949

50-
error = InfluxDB::ConnectionError.new "Tried 0 times to reconnect but failed."
51-
expect { subject.send(:connect_with_retry) }.to raise_error(InfluxDB::ConnectionError)
50+
expect { subject.send(:connect_with_retry) }.to raise_error(InfluxDB::ConnectionError, "Tried 0 times to reconnect but failed.")
5251
end
5352
end
5453

0 commit comments

Comments
 (0)