mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-23 09:07:46 +02:00
test(heartbeat): relax deferred wake batching run count
This commit is contained in:
1 parent
38add6ebb9
commit
685c0b69dc
1 file changed
+6
-2
@@ -404,8 +404,12 @@ describe("heartbeat comment wake batching", () => {
|
||||
|
||||
await waitFor(() => gateway.getAgentPayloads().length === 2);
|
||||
await waitFor(async () => {
|
||||
const runs = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.agentId, agentId));
|
||||
return runs.length === 2 && runs.every((run) => run.status === "succeeded");
|
||||
const runs = await db
|
||||
.select()
|
||||
.from(heartbeatRuns)
|
||||
.where(eq(heartbeatRuns.agentId, agentId))
|
||||
.orderBy(asc(heartbeatRuns.createdAt));
|
||||
return runs.length >= 2 && runs.slice(0, 2).every((run) => run.status === "succeeded");
|
||||
}, 90_000);
|
||||
|
||||
const secondPayload = gateway.getAgentPayloads()[1] ?? {};
|
||||
|
||||
Reference in new issue
Block a user