Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable not used queues/database modules on E2E tests #2082

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hectorgomezv
Copy link
Member

Summary

This PR aims to fix the following CI error while running E2E tests:

  ● Test suite failed to run

    Unhandled error. (Error: Channel ended, no reply will be forthcoming

      at rej (node_modules/amqplib/lib/channel.js:181:9)
      at ConfirmChannel._rejectPending (node_modules/amqplib/lib/channel.js:184:7)
      at ConfirmChannel.toClosed (node_modules/amqplib/lib/channel.js:150:10)
     ...

While the root cause is not fully clear, chances are a race condition between the tests causes the shutdown hook to try to close an amqp channel that is already closed. This PR does two related things:

  • It wraps the QueuesApiShutdownHook.onModuleDestroy code into a try-catch block, so the possible error is handled (and therefore it shouldn't cause a test execution failure),
  • It disables the infrastructure that is not involved in the E2E tests (by overriding PostgresDatabaseModule and QueuesApiModule).

Changes

  • Add a try-catch block to QueuesApiShutdownHook.onModuleDestroy so possible errors are handled.
  • Disable PostgresDatabaseModule and QueuesApiModule where they are not required.

@hectorgomezv hectorgomezv self-assigned this Oct 31, 2024
@hectorgomezv hectorgomezv requested a review from a team as a code owner October 31, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants