Skip to content

Commit

Permalink
Fixed tests [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 20, 2021
1 parent c47d7dc commit 31d86b0
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 18 deletions.
3 changes: 3 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ end

appraise "activemerchant" do
gem "activemerchant"
gem "rexml"
end

appraise "activerecord" do
Expand All @@ -34,6 +35,7 @@ end

appraise "aws_sdk" do
gem "aws-sdk-s3"
gem "rexml"
end

appraise "azure" do
Expand All @@ -54,6 +56,7 @@ end

appraise "cassandra_driver" do
gem "cassandra-driver"
gem "sorted_set"
end

appraise "clearbit" do
Expand Down
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,7 @@ Raises same exceptions as [elasticsearch](#elasticsearch)
Typesense::Client.new(connection_timeout_seconds: 1)
```

Raises

- `Net::OpenTimeout` on connect timeout
- `Net::ReadTimeout` on read timeout
Raises `Typesense::Error::TimeoutError`

## HTTP Clients

Expand Down Expand Up @@ -1388,10 +1385,7 @@ Raises
Slack::Web::Client.new(open_timeout: 1, timeout: 1)
```

Raises

- `Faraday::ConnectionFailed` on connect timeout
- `Faraday::TimeoutError` on read timeout
Raises `Slack::Web::Api::Errors::TimeoutError`

### smartystreets_ruby_sdk

Expand Down Expand Up @@ -1482,10 +1476,7 @@ Raises `ZendeskAPI::Error::NetworkError`
Acme::Client.new(connection_options: {request: {open_timeout: 1, timeout: 1}})
```

Raises

- `Faraday::ConnectionFailed` on connect timeout
- `Faraday::TimeoutError` on read timeout
Raises `Acme::Client::Error::Timeout`

### actionmailer

Expand Down
1 change: 1 addition & 0 deletions gemfiles/activemerchant.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ source "https://rubygems.org"
gem "appraisal"
gem "minitest"
gem "activemerchant"
gem "rexml"
2 changes: 2 additions & 0 deletions gemfiles/activemerchant.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ GEM
racc (~> 1.4)
racc (1.5.2)
rake (13.0.6)
rexml (3.2.5)
thor (1.1.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
Expand All @@ -39,6 +40,7 @@ DEPENDENCIES
activemerchant
appraisal
minitest
rexml

BUNDLED WITH
2.2.27
1 change: 1 addition & 0 deletions gemfiles/aws_sdk.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ source "https://rubygems.org"
gem "appraisal"
gem "minitest"
gem "aws-sdk-s3"
gem "rexml"
2 changes: 2 additions & 0 deletions gemfiles/aws_sdk.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ GEM
jmespath (1.4.0)
minitest (5.14.4)
rake (13.0.6)
rexml (3.2.5)
thor (1.1.0)

PLATFORMS
Expand All @@ -33,6 +34,7 @@ DEPENDENCIES
appraisal
aws-sdk-s3
minitest
rexml

BUNDLED WITH
2.2.27
1 change: 1 addition & 0 deletions gemfiles/cassandra_driver.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ source "https://rubygems.org"
gem "appraisal"
gem "minitest"
gem "cassandra-driver"
gem "sorted_set"
6 changes: 6 additions & 0 deletions gemfiles/cassandra_driver.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ GEM
ione (1.2.4)
minitest (5.14.4)
rake (13.0.6)
rbtree (0.4.4)
set (1.0.1)
sorted_set (1.0.3)
rbtree
set (~> 1.0)
thor (1.1.0)

PLATFORMS
Expand All @@ -19,6 +24,7 @@ DEPENDENCIES
appraisal
cassandra-driver
minitest
sorted_set

BUNDLED WITH
2.2.27
4 changes: 2 additions & 2 deletions test/acme_client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_connect
connection_options: {request: {open_timeout: 1}}
)

assert_timeout(Faraday::ConnectionFailed) do
assert_timeout(Acme::Client::Error::Timeout) do
client.new_account(contact: "mailto:info@example.com", terms_of_service_agreed: true)
end
end
Expand All @@ -22,7 +22,7 @@ def test_read
connection_options: {request: {timeout: 1}}
)

assert_timeout(Faraday::TimeoutError) do
assert_timeout(Acme::Client::Error::Timeout) do
client.new_account(contact: "mailto:info@example.com", terms_of_service_agreed: true)
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/slack_ruby_client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
class SlackRubyClientTest < Minitest::Test
def test_connect
client = Slack::Web::Client.new(endpoint: connect_url, open_timeout: 1)
assert_timeout(Faraday::ConnectionFailed) do
assert_timeout(Slack::Web::Api::Errors::TimeoutError) do
client.auth_test
end
end

def test_read
client = Slack::Web::Client.new(endpoint: read_url, timeout: 1)
assert_timeout(Faraday::TimeoutError) do
assert_timeout(Slack::Web::Api::Errors::TimeoutError) do
client.auth_test
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/typesense_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_connect
connection_timeout_seconds: 1,
num_retries: 0
)
assert_timeout(Net::OpenTimeout) do
assert_timeout(Typesense::Error::TimeoutError) do
client.collections.retrieve
end
end
Expand All @@ -20,7 +20,7 @@ def test_read
connection_timeout_seconds: 1,
num_retries: 0
)
assert_timeout(Net::ReadTimeout) do
assert_timeout(Typesense::Error::TimeoutError) do
client.collections.retrieve
end
end
Expand Down

0 comments on commit 31d86b0

Please sign in to comment.