Fix increasing test timeout on github actions
This commit is contained in:
parent
0f44c51b00
commit
1b2894bf99
@ -125,8 +125,8 @@ function testLdapAuth() {
|
|||||||
|
|
||||||
describe("LDAP authentication plugin", function() {
|
describe("LDAP authentication plugin", function() {
|
||||||
// Increase timeout due to unpredictable I/O on CI services
|
// Increase timeout due to unpredictable I/O on CI services
|
||||||
this.timeout(process.env.CI ? 25000 : 5000);
|
this.timeout(TestUtil.isRunningOnCI() ? 25000 : 5000);
|
||||||
this.slow(200);
|
this.slow(300);
|
||||||
|
|
||||||
let server;
|
let server;
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ const link = require("../../src/plugins/irc-events/link.js");
|
|||||||
|
|
||||||
describe("Link plugin", function() {
|
describe("Link plugin", function() {
|
||||||
// Increase timeout due to unpredictable I/O on CI services
|
// Increase timeout due to unpredictable I/O on CI services
|
||||||
this.timeout(process.env.CI ? 25000 : 5000);
|
this.timeout(util.isRunningOnCI() ? 25000 : 5000);
|
||||||
this.slow(200);
|
this.slow(300);
|
||||||
|
|
||||||
const loremIpsum = `Lorem ipsum dolor sit amet, consectetur adipiscing elit.\
|
const loremIpsum = `Lorem ipsum dolor sit amet, consectetur adipiscing elit.\
|
||||||
Vivamus at pretium mauris. Aenean eu orci id erat pulvinar\
|
Vivamus at pretium mauris. Aenean eu orci id erat pulvinar\
|
||||||
|
@ -3,13 +3,15 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const expect = require("chai").expect;
|
const expect = require("chai").expect;
|
||||||
|
const util = require("../util");
|
||||||
const Msg = require("../../src/models/msg");
|
const Msg = require("../../src/models/msg");
|
||||||
const Helper = require("../../src/helper");
|
const Helper = require("../../src/helper");
|
||||||
const MessageStorage = require("../../src/plugins/messageStorage/sqlite.js");
|
const MessageStorage = require("../../src/plugins/messageStorage/sqlite.js");
|
||||||
|
|
||||||
describe("SQLite Message Storage", function() {
|
describe("SQLite Message Storage", function() {
|
||||||
// Increase timeout due to unpredictable I/O on CI services
|
// Increase timeout due to unpredictable I/O on CI services
|
||||||
this.timeout(process.env.CI ? 25000 : 5000);
|
this.timeout(util.isRunningOnCI() ? 25000 : 5000);
|
||||||
|
this.slow(300);
|
||||||
|
|
||||||
const expectedPath = path.join(Helper.getHomePath(), "logs", "testUser.sqlite3");
|
const expectedPath = path.join(Helper.getHomePath(), "logs", "testUser.sqlite3");
|
||||||
let store;
|
let store;
|
||||||
|
@ -10,8 +10,8 @@ const link = require("../../src/plugins/irc-events/link.js");
|
|||||||
|
|
||||||
describe("Image storage", function() {
|
describe("Image storage", function() {
|
||||||
// Increase timeout due to unpredictable I/O on CI services
|
// Increase timeout due to unpredictable I/O on CI services
|
||||||
this.timeout(process.env.CI ? 25000 : 5000);
|
this.timeout(util.isRunningOnCI() ? 25000 : 5000);
|
||||||
this.slow(200);
|
this.slow(300);
|
||||||
|
|
||||||
const testImagePath = path.resolve(__dirname, "../../client/img/logo-grey-bg-120x120px.png");
|
const testImagePath = path.resolve(__dirname, "../../client/img/logo-grey-bg-120x120px.png");
|
||||||
const correctImageHash = crypto
|
const correctImageHash = crypto
|
||||||
|
@ -6,11 +6,12 @@ const expect = require("chai").expect;
|
|||||||
const stub = require("sinon").stub;
|
const stub = require("sinon").stub;
|
||||||
const got = require("got");
|
const got = require("got");
|
||||||
const io = require("socket.io-client");
|
const io = require("socket.io-client");
|
||||||
|
const util = require("./util");
|
||||||
const changelog = require("../src/plugins/changelog");
|
const changelog = require("../src/plugins/changelog");
|
||||||
|
|
||||||
describe("Server", function() {
|
describe("Server", function() {
|
||||||
// Increase timeout due to unpredictable I/O on CI services
|
// Increase timeout due to unpredictable I/O on CI services
|
||||||
this.timeout(process.env.CI ? 25000 : 5000);
|
this.timeout(util.isRunningOnCI() ? 25000 : 5000);
|
||||||
|
|
||||||
let server;
|
let server;
|
||||||
|
|
||||||
|
@ -61,4 +61,7 @@ module.exports = {
|
|||||||
return express();
|
return express();
|
||||||
},
|
},
|
||||||
sanitizeLog,
|
sanitizeLog,
|
||||||
|
isRunningOnCI() {
|
||||||
|
return process.env.CI || process.env.GITHUB_ACTIONS;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user