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

CLI: increase smoke test timeout to 30s #4859

Merged
merged 6 commits into from
Jul 29, 2019
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
6 changes: 5 additions & 1 deletion cli/lib/tasks/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const logger = require('../logger')
const xvfb = require('../exec/xvfb')
const state = require('./state')

const VERIFY_TEST_RUNNER_TIMEOUT_MS = 30000

const checkExecutable = (binaryDir) => {
const executable = state.getPathToExecutable(binaryDir)

Expand Down Expand Up @@ -90,6 +92,7 @@ const runSmokeTest = (binaryDir, options) => {
debug('running smoke test')
debug('using Cypress executable %s', executable)
debug('smoke test command:', smokeTestCommand)
debug('smoke test timeout %d ms', options.smokeTestTimeout)

const env = _.extend({}, process.env, {
ELECTRON_ENABLE_LOGGING: true,
Expand Down Expand Up @@ -242,7 +245,7 @@ const start = (options = {}) => {
dev: false,
force: false,
welcomeMessage: true,
smokeTestTimeout: 10000,
smokeTestTimeout: VERIFY_TEST_RUNNER_TIMEOUT_MS,
})

if (options.dev) {
Expand Down Expand Up @@ -346,4 +349,5 @@ const start = (options = {}) => {

module.exports = {
start,
VERIFY_TEST_RUNNER_TIMEOUT_MS,
}
6 changes: 5 additions & 1 deletion cli/test/lib/tasks/verify_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ context('lib/tasks/verify', () => {
Stdout.restore()
})

it('has verify task timeout', () => {
expect(verify.VERIFY_TEST_RUNNER_TIMEOUT_MS).to.be.gt(10000)
})

it('logs error and exits when no version of Cypress is installed', () => {

return verify
Expand Down Expand Up @@ -230,7 +234,7 @@ context('lib/tasks/verify', () => {
const stdioOptions = util.exec.firstCall.args[2]

expect(stdioOptions).to.include({
timeout: 10000,
timeout: verify.VERIFY_TEST_RUNNER_TIMEOUT_MS,
})

expect(stdioOptions.env).to.include({
Expand Down