diff --git a/packages/studio-server/src/history/videoState.ts b/packages/studio-server/src/history/videoState.ts index 700bab8254..a42bbbcf5a 100644 --- a/packages/studio-server/src/history/videoState.ts +++ b/packages/studio-server/src/history/videoState.ts @@ -140,7 +140,13 @@ async function updateState(dir: string, update: (state: VideoState) => void): Pr let timer: ReturnType | undefined; const gaveUp = new Promise((_, reject) => { timer = setTimeout( - () => reject(new Error(`The video state did not answer within ${STATE_WAIT_MS} ms.`)), + () => + reject( + new Error( + `The video state did not answer within ${STATE_WAIT_MS} ms. The save may still land later, so save ` + + "again only through updateState, which waits for it.", + ), + ), STATE_WAIT_MS, ); }); diff --git a/packages/studio-server/src/history/videoStateSilentDrive.test.ts b/packages/studio-server/src/history/videoStateSilentDrive.test.ts index d2c51b3746..d77a17cdf4 100644 --- a/packages/studio-server/src/history/videoStateSilentDrive.test.ts +++ b/packages/studio-server/src/history/videoStateSilentDrive.test.ts @@ -47,7 +47,7 @@ it.skipIf(process.platform === "win32")( for (let turn = 0; turn < 5; turn++) await new Promise((next) => setImmediate(next)); expect(settled).toBe(false); await vi.advanceTimersByTimeAsync(5000); - expect(await outcome).toMatch(/did not answer within 5000 ms/); + expect(await outcome).toMatch(/did not answer within 5000 ms\. The save may still land later/); vi.useRealTimers(); // The drive answers: the given-up write finishes and frees the lock, so the next write takes it (one still held