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.
This commit is contained in:
Miguel Ángel
2026-10-24 00:15:10 +00:00
committed by GitHub
parent e077d9dc74
commit 19cc96e3f2
@@ -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);
});