mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user