mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 23:03:09 +00:00
test(engine): give the real-ffmpeg audio suites a timeout Windows can meet
`Tests on windows-latest` failed on two of the seven cases in audioMixer.grouping.test.ts -- both `Test timed out in 5000ms`, not an assertion. Every case in that suite mixes with REAL ffmpeg, and vitest's default 5s per test is not enough for that on a Windows runner: the same suite passes on macOS and ubuntu, and the job's own "Install FFmpeg" step logged a download-failure warning before falling back. A suite-level 60s covers all seven at once rather than seven per-test arguments. audioMixer.level.test.ts gets the same treatment. It has not failed yet, but it is the same real-ffmpeg shape one spawn slower away from it. Both files are this branch's, so this is the branch's own flake to fix; engine has no existing per-test timeout convention to follow, hence the suite argument plus a comment saying which platform forced it.
This commit is contained in:
@@ -103,7 +103,12 @@ const track = (id: string, end: number, volume = 1) => ({
|
||||
type: "audio" as const,
|
||||
});
|
||||
|
||||
describe.skipIf(!HAS_FFMPEG)("mix level arithmetic", () => {
|
||||
// Every case here mixes with REAL ffmpeg, and vitest's default 5s per test is not
|
||||
// enough for that on a Windows runner — two cases timed out there while passing
|
||||
// everywhere else (PR #3363). The suite-level timeout covers all of them at once.
|
||||
describe.skipIf(!HAS_FFMPEG)(
|
||||
"mix level arithmetic",
|
||||
() => {
|
||||
afterEach(() => {
|
||||
for (const dir of tempDirs.splice(0)) rmSync(dir, { recursive: true, force: true });
|
||||
});
|
||||
@@ -393,4 +398,6 @@ describe.skipIf(!HAS_FFMPEG)("mix level arithmetic", () => {
|
||||
|
||||
expect(Math.abs(meanVolumeDb(groupedOut) - meanVolumeDb(refOut))).toBeLessThan(0.5);
|
||||
});
|
||||
});
|
||||
},
|
||||
60_000,
|
||||
);
|
||||
|
||||
@@ -55,7 +55,12 @@ function firstAudibleSeconds(path: string): number {
|
||||
throw new Error(`No audible sample found in ${path}`);
|
||||
}
|
||||
|
||||
describe.skipIf(!HAS_FFMPEG)("processCompositionAudio levels", () => {
|
||||
// Same real-ffmpeg exposure as audioMixer.grouping.test.ts, which timed out on a
|
||||
// Windows runner at vitest's default 5s. This one has not failed yet; it is one
|
||||
// spawn slower away from it.
|
||||
describe.skipIf(!HAS_FFMPEG)(
|
||||
"processCompositionAudio levels",
|
||||
() => {
|
||||
afterEach(() => {
|
||||
for (const dir of tempDirs.splice(0)) rmSync(dir, { recursive: true, force: true });
|
||||
});
|
||||
@@ -161,4 +166,6 @@ describe.skipIf(!HAS_FFMPEG)("processCompositionAudio levels", () => {
|
||||
expect(result.success).toBe(true);
|
||||
expect(firstAudibleSeconds(outputPath)).toBeCloseTo(2, 2);
|
||||
});
|
||||
});
|
||||
},
|
||||
60_000,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user