-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Node started via launchTestNode
isn't closed in tests
#2712
Comments
@maschad Have you experienced this in your PR? |
@arboleya examining the code snippets you've shared I believe the setup is incorrect. If I add some logs to the For example, If we have the following test: it.only('dummy test', async () => {
console.log('before');
using node = await launchTestNode();
console.log('after');
}); and we add some logs to the [Symbol.dispose]: () => {
console.log('disposing provider');
cleanup();
}, we will observe the following output stdout | packages/fuel-gauge/src/reentrant-contract-calls.test.ts > Reentrant Contract Calls > dummy test
before
stdout | packages/fuel-gauge/src/reentrant-contract-calls.test.ts > Reentrant Contract Calls > dummy test
after
disposing provider |
I can reproduce this bug locally. Run the snippet file in the first example and then run |
Repro
Create a test with the snippet below and execute it.
pnpm test:filter launching.test.ts
The test finishes and exits, but
fuel-core
continues running in the background.Repro 2
I also tried it with
const
+cleanup
; nothing changed.Repro 3
However, it works if I transform this into a regular file (not a test) and execute it.
Conclusion
The utility fails where it will be primarily used: in tests.
The text was updated successfully, but these errors were encountered: