mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 02:55:16 +00:00
test: tighten gateway runtime assertions
This commit is contained in:
parent
8d6bef0de1
commit
e8dc492cb0
2 changed files with 12 additions and 16 deletions
|
|
@ -93,10 +93,8 @@ describe("gateway HTTP request trace scope", () => {
|
|||
.split("\n")
|
||||
.map((line) => JSON.parse(line) as Record<string, unknown>)
|
||||
.find((record) => record.message === "handled request trace");
|
||||
expect(traceRecord).toMatchObject({
|
||||
traceId: activeTraceInHandler?.traceId,
|
||||
spanId: activeTraceInHandler?.spanId,
|
||||
});
|
||||
expect(traceRecord?.traceId).toBe(activeTraceInHandler?.traceId);
|
||||
expect(traceRecord?.spanId).toBe(activeTraceInHandler?.spanId);
|
||||
} finally {
|
||||
fs.rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,18 +185,16 @@ describe("server-runtime-services", () => {
|
|||
expect(services.heartbeatRunner).toBe(hoisted.heartbeatRunner);
|
||||
await vi.advanceTimersByTimeAsync(1_250);
|
||||
await vi.dynamicImportSettled();
|
||||
expect(hoisted.recoverPendingDeliveries).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
deliver: hoisted.deliverOutboundPayloads,
|
||||
cfg: {},
|
||||
}),
|
||||
);
|
||||
expect(hoisted.recoverPendingRestartContinuationDeliveries).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
deps: {},
|
||||
maxEnqueuedAt: 123,
|
||||
}),
|
||||
);
|
||||
expect(hoisted.recoverPendingDeliveries).toHaveBeenCalledWith({
|
||||
deliver: hoisted.deliverOutboundPayloads,
|
||||
cfg: {},
|
||||
log: expect.any(Object),
|
||||
});
|
||||
expect(hoisted.recoverPendingRestartContinuationDeliveries).toHaveBeenCalledWith({
|
||||
deps: {},
|
||||
maxEnqueuedAt: 123,
|
||||
log: expect.any(Object),
|
||||
});
|
||||
});
|
||||
|
||||
it("can defer cron startup while activating other scheduled services", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue