refactor(providers): share queued close attempts (#14563)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-11-25 15:54:04 +00:00
1 parent 2f5dc7b27c
commit dcce28e284
6 files changed
+62 -63

No files matched your search

@@ -328,9 +328,13 @@ describe("completed native resolution finalization", () => {
},
});
if (cleanupFails) {
await expect(provider.close()).rejects.toMatchObject({
cleanupIncomplete: true,
});
const failures = await Promise.all(
[provider.close(), provider.close()].map((attempt) =>
attempt.catch((cause: unknown) => cause),
),
);
expect(failures[0]).toMatchObject({ cleanupIncomplete: true });
expect(failures[1]).toBe(failures[0]);
expect(result.error.cleanupIncomplete).toBe(true);
allowClose = true;
}