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

fix: ungraceful exit #328

Merged
merged 1 commit into from
Mar 15, 2024
Merged

fix: ungraceful exit #328

merged 1 commit into from
Mar 15, 2024

Conversation

josepot
Copy link
Member

@josepot josepot commented Mar 15, 2024

Fixes #327 and a bunch of other small issues.

I've been working on some E2E tests for this, to make sure that we don't have regressions on it. For testing I was going to use the logs-provider idea that I have in the works... However, we realized with @voliva that it's better to wait until he has finished the work that he is currently doing improving the vitest tests, before I bring these E2E tests in.

@josepot josepot added this pull request to the merge queue Mar 15, 2024
Merged via the queue into main with commit b4d2693 Mar 15, 2024
6 checks passed
@josepot josepot deleted the fix/ungraceful-exit branch March 15, 2024 17:05
@Bullrich
Copy link

Update:

It is exciting automatically but it is taking around 30 seconds to do so.

Is this behaviour expected?

Example test:

Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 32.689 s
Ran all test suites.
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.
✨ Done in 62.02s.

Bullrich added a commit to paritytech/get-fellows-action that referenced this pull request Mar 18, 2024
Relates to #9.

Upgraded `papi` to latest version which implements:
- polkadot-api/polkadot-api#325
- polkadot-api/polkadot-api#328
@josepot
Copy link
Member Author

josepot commented Mar 22, 2024

Update:

It is exciting automatically but it is taking around 30 seconds to do so.

Is this behaviour expected?

Example test:

Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 32.689 s
Ran all test suites.
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.
✨ Done in 62.02s.

It depends on which provider you are using. If you are using smoldot, then I think that this is normal, as smoldot is going to try to gracefully close all the open connections with its peers... A way around this (although it's a bit hacky) is to put smoldot into a worker, and then create a JSON-RPC provider from the worker, then we it exists they you can just destroy the worker.

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.

Client does not exit after invoking .destroy()
2 participants