Skip to content
New issue

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

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

Already on GitHub? # to your account

test: Allow runner tests to exit cleanly #12127

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Dec 10, 2024

Noticed runner tests had open handles:

> @n8n/task-runner@1.9.0 test /Users/ivov/Development/n8n/packages/@n8n/task-runner
> jest "--" "src/js-task-runner/__tests__/task-runner.test.ts"

 PASS  src/js-task-runner/__tests__/task-runner.test.ts
  TestRunner
    constructor
      ✓ should correctly construct WebSocket URI with provided taskBrokerUri (6 ms)
      ✓ should handle different taskBrokerUri formats correctly (1 ms)
      ✓ should throw an error if taskBrokerUri is invalid (20 ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        0.943 s, estimated 11 s
Ran all test suites matching /src\/js-task-runner\/__tests__\/task-runner.test.ts/i.
Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing 💟

Copy link

cypress bot commented Dec 10, 2024

n8n    Run #8267

Run Properties:  status check passed Passed #8267  •  git commit bf595f6ea8: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Project n8n
Branch Review allow-runner-tests-to-exit-cleanly
Run status status check passed Passed #8267
Run duration 04m 27s
Commit git commit bf595f6ea8: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Committer Iván Ovejero
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 480
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Dec 10, 2024
@ivov ivov merged commit 8bf6cce into master Dec 10, 2024
37 checks passed
@ivov ivov deleted the allow-runner-tests-to-exit-cleanly branch December 10, 2024 12:09
@janober
Copy link
Member

janober commented Dec 11, 2024

Got released with n8n@1.72.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants