test: wait for deferred gateway agent dispatch

This commit is contained in:
Peter Steinberger
2026-04-29 11:13:22 +01:00
parent 06088c6b05
commit 923837accd
2 changed files with 2 additions and 0 deletions

View File

@@ -252,6 +252,7 @@ describe("gateway server agent", () => {
idempotencyKey: "idem-agent-subdepth",
});
expect(res.ok).toBe(true);
await waitForAgentCall("idem-agent-subdepth");
const raw = await fs.readFile(sharedSessionStorePath, "utf-8");
const persisted = JSON.parse(raw) as Record<

View File

@@ -269,6 +269,7 @@ describe("gateway server agent", () => {
idempotencyKey: "idem-agent-cli-binding",
});
expect(res.ok).toBe(true);
await readAgentCommandCall({ runId: "idem-agent-cli-binding" });
const sessionStorePath = testState.sessionStorePath;
if (!sessionStorePath) {