fix(env): make the listing cancel and platform tests hold in CI

- Give the listing cancel test 30 s: creating 10,000 files takes over 5 s
  on Windows CI.
- Accept an x64 daemon on arm64 macOS: the darwin-x64 release daemon runs
  through Rosetta in CI.
This commit is contained in:
Armin Ronacher 2026-10-13 01:23:33 +02:00
parent de022efd61
commit d6370b72d0

View file

@ -72,7 +72,11 @@ describe("RemoteExecutionEnv", () => {
it("reports the remote system in Node's names", async () => {
const { connection } = environment();
expect(nodePlatform(await connection.info())).toEqual({ platform: process.platform, arch: process.arch });
const { platform, arch } = nodePlatform(await connection.info());
expect(platform).toBe(process.platform);
// CI runs the darwin-x64 release daemon on arm64 macOS through Rosetta, so it reports x64 to arm64 Node.
const rosetta = process.platform === "darwin" && process.arch === "arm64" && arch === "x64";
if (!rosetta) expect(arch).toBe(process.arch);
expect(nodePlatform({ os: "windows", arch: "aarch64" })).toEqual({ platform: "win32", arch: "arm64" });
expect(nodePlatform({ os: "macos", arch: "x86_64" })).toEqual({ platform: "darwin", arch: "x64" });
});
@ -102,7 +106,8 @@ describe("RemoteExecutionEnv", () => {
expect([listed.entries.length, listed.truncated]).toEqual([10_100, false]);
const bounded = getOrThrow(await env.listFiles(".", { maxEntries: 5000 }, context));
expect([bounded.entries.length, bounded.truncated]).toEqual([5000, true]);
});
// Creating 10,000 files takes several seconds on Windows CI.
}, 30_000);
it("times out a command that produces no output", async () => {
const { env } = environment();