fix(test): ジョブキューをテストが終わったら停止するように

Fix #10802 ?
This commit is contained in:
syuilo 2023-05-09 08:32:25 +09:00
parent b16d7cc6c4
commit 5c54e12099
2 changed files with 5 additions and 2 deletions

View File

@ -34,4 +34,6 @@ export async function jobQueue() {
jobQueue.get(QueueProcessorService).start();
jobQueue.get(ChartManagementService).start();
return jobQueue;
}

View File

@ -10,6 +10,7 @@ import type { INestApplicationContext } from '@nestjs/common';
describe('Account Move', () => {
let app: INestApplicationContext;
let jq: INestApplicationContext;
let url: URL;
let root: any;
@ -24,7 +25,7 @@ describe('Account Move', () => {
beforeAll(async () => {
app = await startServer();
await jobQueue();
jq = await jobQueue();
const config = loadConfig();
url = new URL(config.url);
const connection = await initTestDb(false);
@ -39,7 +40,7 @@ describe('Account Move', () => {
}, 1000 * 60 * 2);
afterAll(async () => {
await app.close();
await Promise.all([app.close(), jq.close()]);
});
describe('Create Alias', () => {