Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

test(runtime): report what failed instead of what failed next

rponefc687df85ae3
diff --git a/packages/runtime-local/test/local.test.ts b/packages/runtime-local/test/local.test.ts
index c73fbd80..3c2d9446 100644
--- a/packages/runtime-local/test/local.test.ts
+++ b/packages/runtime-local/test/local.test.ts
@@ -875,6 +875,10 @@ test("one local Worker admits later Builds while preserving shared Endpoint capa
assert.equal(mostLimited, 1, "declared capacity must span independent Builds");
await runtime.close();
} finally {
+ // A throw above skips `runtime.close()`, so SQLite keeps the file open and the removal below
+ // fails with EBUSY on Windows, replacing the error that actually failed the test. Closing here
+ // is a repeat on the passing path, which the state rejects.
+ try { fixture.close(); } catch { /* the passing path already closed it */ }
await rm(directory, { recursive: true, force: true });
}
});
diff --git a/packages/runtime-local/test/worker-process.test.ts b/packages/runtime-local/test/worker-process.test.ts
index 2d13bfc9..19bdecd8 100644
--- a/packages/runtime-local/test/worker-process.test.ts
+++ b/packages/runtime-local/test/worker-process.test.ts
@@ -53,7 +53,13 @@ test("one live detached Runtime Worker survives repeated starts and stale startu
{ command: process.execPath, args: ["-e", program] },
startupTimeoutMs,
),
- ]);
+ ]).catch(async (reason: unknown) => {
+ // Whichever call rejects first is reported, and that is usually the sibling giving up on the
+ // launch lock, whose message says nothing about the launch it was waiting for. The Worker log
+ // is where that answer is, so carry it into the failure.
+ const log = await runtimeProcessLogs(dataRoot).catch(() => ({ text: "" }));
+ throw new Error(`${String(reason)}${log.text.trim() === "" ? "; the Worker log is empty" : `; worker log: ${log.text.trim()}`}`);
+ });
assert.equal(first.state, "running");
assert.ok(first.pid);
assert.equal(concurrent.pid, first.pid);