@@ -405,11 +405,11 @@ describe 'Rack Attack global throttles' do
end
defexpect_rejection(&block)
NUM_TRIES_FOR_REJECTION.timesdo|i|
# NUM_TRIES_FOR_REJECTION.times do |i|
yield
breakifresponse.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
end
# 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})" if i + 1 < NUM_TRIES_FOR_REJECTION