mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 19:15:47 +00:00
test: clarify gateway stability event assertions
This commit is contained in:
parent
3b626e4e36
commit
bd72cc4aa5
1 changed files with 7 additions and 3 deletions
|
|
@ -138,10 +138,14 @@ describe("gateway stability lane", () => {
|
|||
expect(event).not.toHaveProperty("sessionId");
|
||||
expect(event).not.toHaveProperty("sessionKey");
|
||||
}
|
||||
expect(sessionEvents.some((event) => event.outcome === "idle" && event.queueDepth === 0)).toBe(
|
||||
true,
|
||||
const idleDrainedEvents = sessionEvents.filter(
|
||||
(event) => event.outcome === "idle" && event.queueDepth === 0,
|
||||
);
|
||||
expect(sessionEvents.every((event) => event.reason === STABILITY_REASON)).toBe(true);
|
||||
expect(idleDrainedEvents.length).toBeGreaterThan(0);
|
||||
const unexpectedReasons = sessionEvents
|
||||
.map((event) => event.reason)
|
||||
.filter((reason) => reason !== STABILITY_REASON);
|
||||
expect(unexpectedReasons).toEqual([]);
|
||||
|
||||
stopDiagnosticStabilityRecorder();
|
||||
emitDiagnosticEvent({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue