mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:40:44 +00:00
test(gateway): tolerate loaded hook enqueue timing
This commit is contained in:
@@ -288,7 +288,7 @@ describe("gateway server hooks", () => {
|
||||
await withGatewayServer(async ({ port }) => {
|
||||
const direct = await postHook(port, "/hooks/wake", { text: "Direct wake" });
|
||||
expect(direct.status).toBe(200);
|
||||
await waitForSystemEvent();
|
||||
await waitForSystemEvent(5_000);
|
||||
expect(peekSystemEventEntries(resolveMainKey())).toEqual([
|
||||
expect.objectContaining({
|
||||
text: "Direct wake",
|
||||
@@ -299,7 +299,7 @@ describe("gateway server hooks", () => {
|
||||
|
||||
const mapped = await postHook(port, "/hooks/mapped-wake", { subject: "Email" });
|
||||
expect(mapped.status).toBe(200);
|
||||
await waitForSystemEvent();
|
||||
await waitForSystemEvent(5_000);
|
||||
expect(peekSystemEventEntries(resolveMainKey())).toEqual([
|
||||
expect.objectContaining({
|
||||
text: "Mapped wake: Email",
|
||||
|
||||
Reference in New Issue
Block a user