Skip to content

Commit

Permalink
fix flaky e2e record passes test
Browse files Browse the repository at this point in the history
  • Loading branch information
kuceb committed Apr 16, 2021
1 parent 04e854e commit a1d362e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/server/test/e2e/7_record_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ describe('e2e record', () => {
`POST /runs/${runId}/instances`,
`POST /instances/${instanceId}/tests`,
`POST /instances/${instanceId}/results`,
'PUT /screenshots/1.png',
'PUT /videos/video.mp4',
'PUT /screenshots/1.png',
`PUT /instances/${instanceId}/stdout`,

// spec 3
Expand All @@ -82,8 +82,8 @@ describe('e2e record', () => {
`POST /runs/${runId}/instances`,
`POST /instances/${instanceId}/tests`,
`POST /instances/${instanceId}/results`,
'PUT /screenshots/1.png',
'PUT /videos/video.mp4',
'PUT /screenshots/1.png',
`PUT /instances/${instanceId}/stdout`,
])

Expand Down
10 changes: 5 additions & 5 deletions packages/server/test/support/helpers/serverStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,17 @@ const routeHandlers = {
method: 'put',
url: '/videos/:name',
res (req, res) {
return Bluebird.delay(200)
.then(() => {
return res.sendStatus(200)
})
return res.sendStatus(200)
},
},
putScreenshots: {
method: 'put',
url: '/screenshots/:name',
res (req, res) {
return res.sendStatus(200)
return Bluebird.delay(300)
.then(() => {
return res.sendStatus(200)
})
},
},

Expand Down

0 comments on commit a1d362e

Please sign in to comment.