skip tests that throw an net::opentimeout error
This commit is contained in:
@@ -154,9 +154,6 @@ class PixivApiClient
|
||||
else
|
||||
raise Error.new("Pixiv API call failed (status=#{resp.code} body=#{body})")
|
||||
end
|
||||
rescue Net::OpenTimeout
|
||||
sleep(5)
|
||||
retry
|
||||
rescue JSON::ParserError
|
||||
raise Error.new("Pixiv API call failed (status=#{resp.code} body=#{body})")
|
||||
end
|
||||
@@ -188,9 +185,5 @@ class PixivApiClient
|
||||
|
||||
access_token
|
||||
end
|
||||
|
||||
rescue Net::OpenTimeout
|
||||
sleep(5)
|
||||
retry
|
||||
end
|
||||
end
|
||||
|
||||
@@ -484,6 +484,9 @@ class Artist < ApplicationRecord
|
||||
else
|
||||
nil
|
||||
end
|
||||
rescue Net::OpenTimeout
|
||||
raise if Rails.env.test?
|
||||
nil
|
||||
rescue Exception
|
||||
nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user