mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
goodbye mocha timeouts
This commit is contained in:
parent
c2e169f189
commit
1c0720a9e5
11 changed files with 19 additions and 22 deletions
|
@ -59,6 +59,14 @@ module.exports = function (config) {
|
|||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: false
|
||||
singleRun: false,
|
||||
|
||||
client: {
|
||||
mocha: {
|
||||
reporter: 'html', // change Karma's debug.html to the mocha web reporter
|
||||
timeout: 10000,
|
||||
slow: 5000
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -9,14 +9,11 @@ describe('plugins/elasticsearch', function () {
|
|||
describe('lib/health_check', function () {
|
||||
|
||||
var health;
|
||||
|
||||
var plugin;
|
||||
|
||||
var server;
|
||||
|
||||
var get;
|
||||
|
||||
var client;
|
||||
|
||||
beforeEach(function () {
|
||||
// setup the plugin stub
|
||||
plugin = {
|
||||
|
@ -75,7 +72,7 @@ describe('plugins/elasticsearch', function () {
|
|||
});
|
||||
|
||||
it('should set the cluster red if the ping fails, then to green', function () {
|
||||
this.timeout(3000);
|
||||
|
||||
get.withArgs('elasticsearch.url').returns('http://localhost:9200');
|
||||
get.withArgs('elasticsearch.minimumVerison').returns('1.4.4');
|
||||
get.withArgs('kibana.index').returns('.my-kibana');
|
||||
|
@ -100,7 +97,6 @@ describe('plugins/elasticsearch', function () {
|
|||
});
|
||||
|
||||
it('should set the cluster red if the health check status is red, then to green', function () {
|
||||
this.timeout(3000);
|
||||
get.withArgs('elasticsearch.url').returns('http://localhost:9200');
|
||||
get.withArgs('elasticsearch.minimumVerison').returns('1.4.4');
|
||||
get.withArgs('kibana.index').returns('.my-kibana');
|
||||
|
@ -124,7 +120,6 @@ describe('plugins/elasticsearch', function () {
|
|||
});
|
||||
|
||||
it('should set the cluster yellow if the health check timed_out and create index', function () {
|
||||
this.timeout(3000);
|
||||
get.withArgs('elasticsearch.url').returns('http://localhost:9200');
|
||||
get.withArgs('elasticsearch.minimumVerison').returns('1.4.4');
|
||||
get.withArgs('kibana.index').returns('.my-kibana');
|
||||
|
|
|
@ -13,8 +13,6 @@ describe('plugins/elasticsearch', function () {
|
|||
var kbnServer;
|
||||
|
||||
before(function () {
|
||||
this.timeout(10000);
|
||||
|
||||
kbnServer = new KbnServer({
|
||||
server: { autoListen: false },
|
||||
logging: { quiet: true },
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('plugins/elasticsearch', function () {
|
|||
});
|
||||
|
||||
after(function () {
|
||||
kbnServer.close();
|
||||
return kbnServer.close();
|
||||
});
|
||||
|
||||
describe('lib/validate', function () {
|
||||
|
|
|
@ -81,6 +81,6 @@ module.exports = class KbnServer {
|
|||
}
|
||||
|
||||
async close() {
|
||||
await fromNode(cb => this.server.stop());
|
||||
await fromNode(cb => this.server.stop(cb));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -35,7 +35,6 @@ describe('Clipboard directive', function () {
|
|||
|
||||
describe.skip('With flash disabled', function () {
|
||||
beforeEach(function () {
|
||||
this.timeout(5000);
|
||||
sinon.stub(window.ZeroClipboard, 'isFlashUnusable', _.constant(true));
|
||||
init();
|
||||
});
|
||||
|
@ -57,7 +56,6 @@ describe('Clipboard directive', function () {
|
|||
|
||||
describe.skip('With flash enabled', function () {
|
||||
beforeEach(function () {
|
||||
this.timeout(5000);
|
||||
sinon.stub(window.ZeroClipboard, 'isFlashUnusable', _.constant(false));
|
||||
init();
|
||||
});
|
||||
|
|
|
@ -6,12 +6,10 @@ describe('Timefilter service', function () {
|
|||
describe('Refresh interval diff watcher', function () {
|
||||
|
||||
var fn;
|
||||
|
||||
var update;
|
||||
|
||||
var fetch;
|
||||
|
||||
var timefilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -6,12 +6,10 @@ describe('Timefilter service', function () {
|
|||
describe('time diff watcher', function () {
|
||||
|
||||
var fn;
|
||||
|
||||
var update;
|
||||
|
||||
var fetch;
|
||||
|
||||
var timefilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -90,6 +90,8 @@ describe('ObjDefine Utility', function () {
|
|||
var obj = def.create();
|
||||
|
||||
expect(function () {
|
||||
'use strict'; // eslint-disable-line strict
|
||||
|
||||
obj.name = notval;
|
||||
}).to.throwException();
|
||||
});
|
||||
|
|
|
@ -24,7 +24,6 @@ var geoJsonData = require('fixtures/vislib/mock_data/geohash/_geo_json');
|
|||
// ];
|
||||
|
||||
describe('TileMap Map Tests', function () {
|
||||
this.timeout(0);
|
||||
var $mockMapEl = $('<div>');
|
||||
var TileMapMap;
|
||||
var leafletStubs = {};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
module.exports = {
|
||||
options: {
|
||||
timeout: 2000,
|
||||
timeout: 10000,
|
||||
slow: 5000,
|
||||
ignoreLeaks: false,
|
||||
reporter: 'dot'
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue