nestjs / bull

Bull module for Nest framework (node.js) :cow:
https://nestjs.com
MIT License
597 stars 98 forks source link

Queue Processor Not Closing in E2E Test Modules #2168

Closed Rcuz8 closed 1 month ago

Rcuz8 commented 1 month ago

Is there an existing issue for this?

Current behavior

E2E tests will never exit when using NestJS Queues: https://docs.nestjs.com/techniques/queues.

Minimum reproduction code

https://github.com/Rcuz8/nestjs-queues-bug

Steps to reproduce

No response

Expected behavior

The e2e tests should exit

Package

Other package

@nestjs/bullmq

NestJS version

10.4.2

Packages versions

"dependencies": {
    "@nestjs/bullmq": "^10.1.1",
    "@nestjs/common": "^10.0.0",
    "@nestjs/config": "^3.2.3",
    "@nestjs/core": "^10.0.0",
    "@nestjs/platform-express": "^10.0.0",
    "bullmq": "^5.10.0",
    "class-transformer": "^0.5.1",
    "class-validator": "^0.14.1",
    "reflect-metadata": "^0.2.0",
    "rxjs": "^7.8.1"
  },

Node.js version

20.11.0

In which operating systems have you tested?

Other

No response

kamilmysliwiec commented 1 month ago

You need to call await app.close() in the afterAll/afterEach hook