Files
reverse-engineering-anything/tests/boundary/filesystem/referenceSourceFifoRace.test.ts
T
84990f9777 test: remove fixed child-process deadlines from tests
239 literal timeoutMs values on cli.run and processes.run only restated
a guess at host speed. On hosted runners with four workers, cliOutput's
3-second value failed while the command still produced correct output.
Deadlines that are the behavior under test, derived from an operation
budget, or that bound a regression's wait remain.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:21:13 +08:00

30 lines
968 B
TypeScript

import { fileURLToPath } from "node:url";
import { expect } from "vitest";
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
import { processTest } from "../../support/process/processFixture.js";
processTest.skipIf(process.platform === "win32")(
"rejects a FIFO replacing an admitted source file without waiting for a writer",
async ({ processes }) => {
const root = await createTestTempDirectory("rea-reference-fifo-race-");
const probe = fileURLToPath(
new URL("../../fixtures/referenceReaderFifoProbe.mjs", import.meta.url),
);
const readerModule = fileURLToPath(
new URL(
"../../../dist/reference/ReferenceSourceReaderFile.js",
import.meta.url,
),
);
const result = await processes.run(process.execPath, [
probe,
readerModule,
root,
]);
expect(result.exitCode, result.stderr).toBe(0);
expect(result.stdout.trim()).toBe("changed");
},
);