mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
Increase database test timeout to 10 seconds
Setting up the database is slow.
This commit is contained in:
parent
e39474bc23
commit
0070aa7ee7
@ -145,19 +145,22 @@ describe('ProjectMiddleware', () => {
|
||||
|
||||
let database!: Database;
|
||||
|
||||
beforeEach(async () => {
|
||||
jest.clearAllMocks();
|
||||
next = jest.fn();
|
||||
database = new Database();
|
||||
await database.createAndConnect();
|
||||
beforeEach(
|
||||
async () => {
|
||||
jest.clearAllMocks();
|
||||
next = jest.fn();
|
||||
database = new Database();
|
||||
await database.createAndConnect();
|
||||
|
||||
if (req.headers === undefined) {
|
||||
req.headers = {};
|
||||
}
|
||||
if (req.headers === undefined) {
|
||||
req.headers = {};
|
||||
}
|
||||
|
||||
req.headers['tenantid'] = mockedObjectId.toString();
|
||||
req.headers['apikey'] = mockedObjectId.toString();
|
||||
});
|
||||
req.headers['tenantid'] = mockedObjectId.toString();
|
||||
req.headers['apikey'] = mockedObjectId.toString();
|
||||
},
|
||||
10 * 1000 // 10 second timeout because setting up the DB is slow
|
||||
);
|
||||
|
||||
afterEach(async () => {
|
||||
await database.disconnectAndDropDatabase();
|
||||
|
@ -12,10 +12,13 @@ import { fail } from 'assert';
|
||||
|
||||
describe('probeService', () => {
|
||||
let database!: Database;
|
||||
beforeEach(async () => {
|
||||
database = new Database();
|
||||
await database.createAndConnect();
|
||||
});
|
||||
beforeEach(
|
||||
async () => {
|
||||
database = new Database();
|
||||
await database.createAndConnect();
|
||||
},
|
||||
10 * 1000 // 10 second timeout because setting up the DB is slow
|
||||
);
|
||||
|
||||
afterEach(async () => {
|
||||
await database.disconnectAndDropDatabase();
|
||||
|
Loading…
Reference in New Issue
Block a user