From 19cc96e3f29337cfe1ed655121c8c48d8b310f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Sat, 24 Oct 2026 00:15:10 +0000 Subject: [PATCH] test(engine): only h264 is held to identical bytes across host sizes (#6167) x265 output varies between runs on one host, so that case flaked the merge queue. --- .../src/services/softwareEncoderThreads.test.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/engine/src/services/softwareEncoderThreads.test.ts b/packages/engine/src/services/softwareEncoderThreads.test.ts index f82b46c5c7..4f7d5d0f45 100644 --- a/packages/engine/src/services/softwareEncoderThreads.test.ts +++ b/packages/engine/src/services/softwareEncoderThreads.test.ts @@ -72,7 +72,7 @@ describe.skipIf(!HAS_TASKSET || !HAS_FFMPEG)("encoded bytes across host sizes", }); /** Encode with the production args as a host with `cpus` cores would run them. */ - function videoMd5(codec: "h264" | "h265", cpus: string): string { + function videoMd5(codec: "h264", cpus: string): string { const dir = mkdtempSync(join(tmpdir(), "hf-threads-")); dirs.push(dir); const out = join(dir, "out.mp4"); @@ -88,11 +88,8 @@ describe.skipIf(!HAS_TASKSET || !HAS_FFMPEG)("encoded bytes across host sizes", return md5.stdout.trim(); } - it.each(["h264", "h265"] as const)( - "gives %s identical bytes on a 2-core and a 7-core host", - (codec) => { - expect(videoMd5(codec, "0-1")).toBe(videoMd5(codec, "0-6")); - }, - 120_000, - ); + // x265 output varies between runs even on one host, so only x264 can be held to identical bytes. + it("gives h264 identical bytes on a 2-core and a 7-core host", () => { + expect(videoMd5("h264", "0-1")).toBe(videoMd5("h264", "0-6")); + }, 120_000); });