Skip to content

Commit aa88523

Browse files
committed
test(isolated-vm): report an execution that fails before it is held
1 parent ac161ec commit aa88523

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/sim/scripts/test-isolated-vm-remote-e2e.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,13 @@ async function run() {
411411
const running = execute(
412412
`const r = await fetch('http://127.0.0.1:${slowAddress.port}/hold'); return await r.text()`
413413
)
414-
const release = await held
414+
// An execution that fails before its fetch arrives reports its own error, not the deadline.
415+
const release = await Promise.race([
416+
held,
417+
running.then((result) => {
418+
throw new Error(`Execution ended before it was held: ${result.error?.message}`)
419+
}),
420+
])
415421
try {
416422
inspect()
417423
} finally {

0 commit comments

Comments
 (0)