Skip to content

Commit 7dacd6b

Browse files
committed
Speed up multipart retry specs
1 parent 8ff7ce6 commit 7dacd6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/uploadcare/clients/upload_client_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ module Uploadcare
446446
before do
447447
stub_request(:put, presigned_url)
448448
.to_return(status: 500, body: 'Internal Server Error')
449+
allow(client).to receive(:sleep)
449450
end
450451

451452
it 'retries on failure' do
@@ -460,6 +461,7 @@ module Uploadcare
460461
# First two attempts fail, third succeeds
461462
stub_request(:put, presigned_url)
462463
.to_return({ status: 500 }, { status: 500 }, { status: 200 })
464+
allow(client).to receive(:sleep)
463465
end
464466

465467
it 'succeeds after retries' do

0 commit comments

Comments
 (0)