mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
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>
30 lines
968 B
TypeScript
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");
|
|
},
|
|
);
|