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

unreliable test: emits "disconnect" after quit #314

Closed
justinmk opened this issue Feb 8, 2024 · 0 comments · Fixed by #414
Closed

unreliable test: emits "disconnect" after quit #314

justinmk opened this issue Feb 8, 2024 · 0 comments · Fixed by #414
Labels

Comments

@justinmk
Copy link
Member

justinmk commented Feb 8, 2024

FAIL src/attach/attach.test.ts (5.62 s)
  ● Nvim API › emits "disconnect" after quit

    thrown: "Exceeded timeout of 5000 ms for a test while waiting for `done()` to be called.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      1[36](https://github.com/neovim/node-client/actions/runs/8328199355/job/22787637114?pr=336#step:11:37) |   });
      1[37](https://github.com/neovim/node-client/actions/runs/8328199355/job/22787637114?pr=336#step:11:38) |
    > 1[38](https://github.com/neovim/node-client/actions/runs/8328199355/job/22787637114?pr=336#step:11:39) |   it('emits "disconnect" after quit', done => {
          |   ^
      1[39](https://github.com/neovim/node-client/actions/runs/8328199355/job/22787637114?pr=336#step:11:40) |     const disconnectMock = jest.fn();
      1[40](https://github.com/neovim/node-client/actions/runs/8328199355/job/22787637114?pr=336#step:11:41) |     nvim.on('disconnect', disconnectMock);
      1[41](https://github.com/neovim/node-client/actions/runs/8328199355/job/22787637114?pr=336#step:11:42) |     nvim.quit();

      at it (src/attach/attach.test.ts:138:3)
      at Object.describe (src/attach/attach.test.ts:6:1)

A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant