@@ -405,11 +405,11 @@ describe 'Rack Attack global throttles' do
...
@@ -405,11 +405,11 @@ describe 'Rack Attack global throttles' do
end
end
defexpect_rejection(&block)
defexpect_rejection(&block)
NUM_TRIES_FOR_REJECTION.timesdo|i|
# NUM_TRIES_FOR_REJECTION.times do |i|
yield
yield
breakifresponse.status==429# success
# break if response.status == 429 # success
Rails.logger.warn"Flaky test expected HTTP status 429 but got #{response.status}. Will attempt again (#{i+1}/#{NUM_TRIES_FOR_REJECTION})"ifi+1<NUM_TRIES_FOR_REJECTION
# Rails.logger.warn "Flaky test expected HTTP status 429 but got #{response.status}. Will attempt again (#{i + 1}/#{NUM_TRIES_FOR_REJECTION})" if i + 1 < NUM_TRIES_FOR_REJECTION