Default timeout to 30 seconds on CI and 10 seconds locally
This commit is contained in:
parent
4ccc3d9fb3
commit
10386edea5
6 changed files with 1 additions and 29 deletions
|
@ -163,8 +163,6 @@ describe('app module', function () {
|
||||||
describe('app.importCertificate', function () {
|
describe('app.importCertificate', function () {
|
||||||
if (process.platform !== 'linux') return
|
if (process.platform !== 'linux') return
|
||||||
|
|
||||||
this.timeout(5000)
|
|
||||||
|
|
||||||
var w = null
|
var w = null
|
||||||
var certPath = path.join(__dirname, 'fixtures', 'certificates')
|
var certPath = path.join(__dirname, 'fixtures', 'certificates')
|
||||||
var options = {
|
var options = {
|
||||||
|
|
|
@ -211,7 +211,6 @@ describe('browser-window module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('does not crash in did-fail-provisional-load handler', function (done) {
|
it('does not crash in did-fail-provisional-load handler', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
w.webContents.once('did-fail-provisional-load', function () {
|
w.webContents.once('did-fail-provisional-load', function () {
|
||||||
w.loadURL('http://127.0.0.1:11111')
|
w.loadURL('http://127.0.0.1:11111')
|
||||||
done()
|
done()
|
||||||
|
@ -284,7 +283,6 @@ describe('browser-window module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('emits when window is shown', function (done) {
|
it('emits when window is shown', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
w.once('show', function () {
|
w.once('show', function () {
|
||||||
assert.equal(w.isVisible(), true)
|
assert.equal(w.isVisible(), true)
|
||||||
done()
|
done()
|
||||||
|
@ -310,7 +308,6 @@ describe('browser-window module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('emits when window is hidden', function (done) {
|
it('emits when window is hidden', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
w.show()
|
w.show()
|
||||||
w.once('hide', function () {
|
w.once('hide', function () {
|
||||||
assert.equal(w.isVisible(), false)
|
assert.equal(w.isVisible(), false)
|
||||||
|
@ -1002,7 +999,6 @@ describe('browser-window module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('emits when link with target is called', function (done) {
|
it('emits when link with target is called', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
w.webContents.once('new-window', function (e, url, frameName) {
|
w.webContents.once('new-window', function (e, url, frameName) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
assert.equal(url, 'http://host/')
|
assert.equal(url, 'http://host/')
|
||||||
|
@ -1019,7 +1015,6 @@ describe('browser-window module', function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
it('emits when window is maximized', function (done) {
|
it('emits when window is maximized', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
w.once('maximize', function () {
|
w.once('maximize', function () {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
@ -1034,7 +1029,6 @@ describe('browser-window module', function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
it('emits when window is unmaximized', function (done) {
|
it('emits when window is unmaximized', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
w.once('unmaximize', function () {
|
w.once('unmaximize', function () {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
@ -1050,7 +1044,6 @@ describe('browser-window module', function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
it('emits when window is minimized', function (done) {
|
it('emits when window is minimized', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
w.once('minimize', function () {
|
w.once('minimize', function () {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
@ -1063,8 +1056,6 @@ describe('browser-window module', function () {
|
||||||
// This test is too slow, only test it on CI.
|
// This test is too slow, only test it on CI.
|
||||||
if (!isCI) return
|
if (!isCI) return
|
||||||
|
|
||||||
this.timeout(20000)
|
|
||||||
|
|
||||||
it('subscribes to frame updates', function (done) {
|
it('subscribes to frame updates', function (done) {
|
||||||
let called = false
|
let called = false
|
||||||
w.loadURL('file://' + fixtures + '/api/frame-subscriber.html')
|
w.loadURL('file://' + fixtures + '/api/frame-subscriber.html')
|
||||||
|
@ -1513,7 +1504,6 @@ describe('browser-window module', function () {
|
||||||
describe('dev tool extensions', function () {
|
describe('dev tool extensions', function () {
|
||||||
describe('BrowserWindow.addDevToolsExtension', function () {
|
describe('BrowserWindow.addDevToolsExtension', function () {
|
||||||
let showPanelIntevalId
|
let showPanelIntevalId
|
||||||
this.timeout(10000)
|
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
BrowserWindow.removeDevToolsExtension('foo')
|
BrowserWindow.removeDevToolsExtension('foo')
|
||||||
|
@ -1595,8 +1585,6 @@ describe('browser-window module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('works when used with partitions', function (done) {
|
it('works when used with partitions', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
|
|
||||||
if (w != null) {
|
if (w != null) {
|
||||||
w.destroy()
|
w.destroy()
|
||||||
}
|
}
|
||||||
|
@ -1747,8 +1735,6 @@ describe('browser-window module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('offscreen rendering', function () {
|
describe('offscreen rendering', function () {
|
||||||
this.timeout(10000)
|
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
if (w != null) w.destroy()
|
if (w != null) w.destroy()
|
||||||
w = new BrowserWindow({
|
w = new BrowserWindow({
|
||||||
|
|
|
@ -434,8 +434,6 @@ describe('ipc module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('does not crash when reply is not sent and browser is destroyed', function (done) {
|
it('does not crash when reply is not sent and browser is destroyed', function (done) {
|
||||||
this.timeout(10000)
|
|
||||||
|
|
||||||
w = new BrowserWindow({
|
w = new BrowserWindow({
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
|
|
|
@ -26,7 +26,6 @@ const kOneKiloByte = 1024
|
||||||
const kOneMegaByte = kOneKiloByte * kOneKiloByte
|
const kOneMegaByte = kOneKiloByte * kOneKiloByte
|
||||||
|
|
||||||
describe('net module', function () {
|
describe('net module', function () {
|
||||||
// this.timeout(0)
|
|
||||||
describe('HTTP basics', function () {
|
describe('HTTP basics', function () {
|
||||||
let server
|
let server
|
||||||
beforeEach(function (done) {
|
beforeEach(function (done) {
|
||||||
|
|
|
@ -28,8 +28,6 @@ describe('chromium feature', function () {
|
||||||
|
|
||||||
describe('sending request of http protocol urls', function () {
|
describe('sending request of http protocol urls', function () {
|
||||||
it('does not crash', function (done) {
|
it('does not crash', function (done) {
|
||||||
this.timeout(5000)
|
|
||||||
|
|
||||||
var server = http.createServer(function (req, res) {
|
var server = http.createServer(function (req, res) {
|
||||||
res.end()
|
res.end()
|
||||||
server.close()
|
server.close()
|
||||||
|
@ -78,8 +76,6 @@ describe('chromium feature', function () {
|
||||||
|
|
||||||
xdescribe('navigator.webkitGetUserMedia', function () {
|
xdescribe('navigator.webkitGetUserMedia', function () {
|
||||||
it('calls its callbacks', function (done) {
|
it('calls its callbacks', function (done) {
|
||||||
this.timeout(5000)
|
|
||||||
|
|
||||||
navigator.webkitGetUserMedia({
|
navigator.webkitGetUserMedia({
|
||||||
audio: true,
|
audio: true,
|
||||||
video: false
|
video: false
|
||||||
|
@ -279,8 +275,6 @@ describe('chromium feature', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('window.opener', function () {
|
describe('window.opener', function () {
|
||||||
this.timeout(10000)
|
|
||||||
|
|
||||||
let url = 'file://' + fixtures + '/pages/window-opener.html'
|
let url = 'file://' + fixtures + '/pages/window-opener.html'
|
||||||
let w = null
|
let w = null
|
||||||
|
|
||||||
|
@ -312,8 +306,6 @@ describe('chromium feature', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('window.opener access from BrowserWindow', function () {
|
describe('window.opener access from BrowserWindow', function () {
|
||||||
this.timeout(10000)
|
|
||||||
|
|
||||||
const scheme = 'other'
|
const scheme = 'other'
|
||||||
let url = `${scheme}://${fixtures}/pages/window-opener-location.html`
|
let url = `${scheme}://${fixtures}/pages/window-opener-location.html`
|
||||||
let w = null
|
let w = null
|
||||||
|
@ -363,8 +355,6 @@ describe('chromium feature', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('window.opener access from <webview>', function () {
|
describe('window.opener access from <webview>', function () {
|
||||||
this.timeout(10000)
|
|
||||||
|
|
||||||
const scheme = 'other'
|
const scheme = 'other'
|
||||||
const srcPath = `${fixtures}/pages/webview-opener-postMessage.html`
|
const srcPath = `${fixtures}/pages/webview-opener-postMessage.html`
|
||||||
const pageURL = `file://${fixtures}/pages/window-opener-location.html`
|
const pageURL = `file://${fixtures}/pages/window-opener-location.html`
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
var mocha = new Mocha();
|
var mocha = new Mocha();
|
||||||
|
|
||||||
mocha.ui('bdd').reporter(isCi ? 'tap' : 'html');
|
mocha.ui('bdd').reporter(isCi ? 'tap' : 'html');
|
||||||
|
mocha.timeout(isCi ? 30000 : 10000)
|
||||||
|
|
||||||
var query = Mocha.utils.parseQuery(window.location.search || '');
|
var query = Mocha.utils.parseQuery(window.location.search || '');
|
||||||
if (query.grep) mocha.grep(query.grep);
|
if (query.grep) mocha.grep(query.grep);
|
||||||
|
|
Loading…
Reference in a new issue