Skip to content

Commit 11784c3

Browse files
bahmutovbrian-mann
authored andcommitted
CLI: increase smoke test timeout to 30s (#4859)
* CLI: increase smoke test timeout to 30s * hmm install reformarrted some files * remove formatting changes * update unit test * add small test to confirm timeout property * revert example changes
1 parent 3111ae1 commit 11784c3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

cli/lib/tasks/verify.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const logger = require('../logger')
1414
const xvfb = require('../exec/xvfb')
1515
const state = require('./state')
1616

17+
const VERIFY_TEST_RUNNER_TIMEOUT_MS = 30000
18+
1719
const checkExecutable = (binaryDir) => {
1820
const executable = state.getPathToExecutable(binaryDir)
1921

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

9497
const env = _.extend({}, process.env, {
9598
ELECTRON_ENABLE_LOGGING: true,
@@ -242,7 +245,7 @@ const start = (options = {}) => {
242245
dev: false,
243246
force: false,
244247
welcomeMessage: true,
245-
smokeTestTimeout: 10000,
248+
smokeTestTimeout: VERIFY_TEST_RUNNER_TIMEOUT_MS,
246249
})
247250

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

347350
module.exports = {
348351
start,
352+
VERIFY_TEST_RUNNER_TIMEOUT_MS,
349353
}

cli/test/lib/tasks/verify_spec.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ context('lib/tasks/verify', () => {
6565
Stdout.restore()
6666
})
6767

68+
it('has verify task timeout', () => {
69+
expect(verify.VERIFY_TEST_RUNNER_TIMEOUT_MS).to.be.gt(10000)
70+
})
71+
6872
it('logs error and exits when no version of Cypress is installed', () => {
6973

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

232236
expect(stdioOptions).to.include({
233-
timeout: 10000,
237+
timeout: verify.VERIFY_TEST_RUNNER_TIMEOUT_MS,
234238
})
235239

236240
expect(stdioOptions.env).to.include({

0 commit comments

Comments
 (0)