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

fuel-core node cleanup doesn't work in bun #3359

Open
nedsalk opened this issue Oct 25, 2024 · 0 comments
Open

fuel-core node cleanup doesn't work in bun #3359

nedsalk opened this issue Oct 25, 2024 · 0 comments
Assignees
Labels
bug Issue is a bug

Comments

@nedsalk
Copy link
Contributor

nedsalk commented Oct 25, 2024

When using bun v1.1.33, trying to call cleanup on the return of launchTestNode results in the following error:

282 |       }
283 |       childState.isDead = true;
284 |       removeSideffects();
285 |       if (child.pid !== void 0) {
286 |         try {
287 |           process.kill(-child.pid);
                ^
RangeError: The value of "pid" is out of range. It must be a positive integer.

There is the issue oven-sh/bun#8787 which documents an additional occurrence of this problem, so it might not be our fault.

Run the following to reproduce:

mkdir bun-test && cd bun-test && bun init -y && bun add [email protected] && echo 'import { test } from "bun:test";
import { launchTestNode } from "fuels/test-utils";

test("test", async () => {
    using launched = await launchTestNode();
});' > failing.test.ts && bun test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

No branches or pull requests

1 participant