Add waitFor to ensure shell session close callback in edge-broker test
This commit is contained in:
@@ -208,6 +208,7 @@ test("broker closes browser shell sessions when the agent disconnects before she
|
||||
|
||||
agent.terminate();
|
||||
await waitForClose(browser);
|
||||
await waitFor(() => closedSessions.length === 1, { description: "disconnect shell session close callback" });
|
||||
|
||||
assert.ok(agentMessages.some((message) => message.type === "OPEN_ROOT_SHELL" && message.payload.sessionId === "shell-4"));
|
||||
assert.deepEqual(closedSessions, [{ transcript: "", reason: "agent_disconnected" }]);
|
||||
|
||||
Reference in New Issue
Block a user