Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix flaky e2e record passes test #16043

Merged
merged 1 commit into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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