Skip to content

Commit

Permalink
Increase retryDelays to hopefully make the exponential backoff test m…
Browse files Browse the repository at this point in the history
…ore robust
  • Loading branch information
arturi committed May 27, 2022
1 parent fba2ffe commit 76a760c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion e2e/clients/dashboard-tus/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ function onShouldRetry (err, retryAttempt, options, next) {
const companionUrl = 'http://localhost:3020'
const uppy = new Uppy()
.use(Dashboard, { target: '#app', inline: true })
.use(Tus, { endpoint: 'https://tusd.tusdemo.net/files', onShouldRetry })
.use(Tus, {
endpoint: 'https://tusd.tusdemo.net/files',
onShouldRetry,
retryDelays: [2000, 3000, 4000],
})
.use(Url, { target: Dashboard, companionUrl })
.use(Unsplash, { target: Dashboard, companionUrl })

Expand Down
3 changes: 1 addition & 2 deletions e2e/cypress/integration/dashboard-tus.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ describe('Dashboard with Tus', () => {
cy.get('.uppy-StatusBar-actionBtn--upload').click()

cy.intercept(
{ method: 'PATCH', pathname: '/files/*', times: 2 },
{ method: 'PATCH', pathname: '/files/*', times: 1 },
{ statusCode: 429, body: {} },
).as('patch')

cy.wait('@patch')
cy.wait('@patch')

cy.window().then(({ uppy }) => {
Expand Down

0 comments on commit 76a760c

Please sign in to comment.