Fix tests

This commit is contained in:
gsxdsm
2026-06-02 21:10:00 -07:00
parent 6d3a077539
commit bddc876d10
2 changed files with 10 additions and 3 deletions

View File

@@ -247,7 +247,7 @@ type PersistSettingInput = {
};
async function expectSettingPersists({ section, label, kind, value, scope, expectedKey }: PersistSettingInput) {
const user = userEvent.setup();
const user = userEvent.setup({ delay: null });
renderModal();
await waitForSettingsModalReady();
await user.click(screen.getByRole("button", { name: new RegExp(`^${section}$`, "i") }));
@@ -282,7 +282,7 @@ async function expectSettingPersists({ section, label, kind, value, scope, expec
}
async function assertProjectModelSavePayload(provider: string, modelId: string, expectedKeys: string[]) {
const user = userEvent.setup();
const user = userEvent.setup({ delay: null });
renderModal({ initialSection: "project-models" });
await waitForSettingsModalReady();

View File

@@ -101,7 +101,7 @@ async function spawnParent(scenario: Scenario): Promise<{ parent: ReturnType<typ
describe("reliability interactions: FN-5189 verification spawn supervision", () => {
const spawnedParents = new Set<ReturnType<typeof spawn>>();
afterEach(() => {
afterEach(async () => {
for (const parent of spawnedParents) {
if (parent.exitCode === null && parent.signalCode === null) {
try {
@@ -109,6 +109,13 @@ describe("reliability interactions: FN-5189 verification spawn supervision", ()
} catch {
// ignore cleanup failures
}
// Wait for the parent to fully exit so the subprocess guard
// does not flag it as "left running" under concurrent load.
try {
await once(parent, "exit");
} catch {
// Already exited
}
}
}
spawnedParents.clear();