test: increase integration helper wait times to 60s for stability
This commit is contained in:
@@ -56,7 +56,7 @@ export async function waitForMemories(
|
|||||||
client: MemoryClient,
|
client: MemoryClient,
|
||||||
userId: string,
|
userId: string,
|
||||||
minCount: number,
|
minCount: number,
|
||||||
maxWaitMs = 30_000,
|
maxWaitMs = 60_000,
|
||||||
): Promise<Memory[]> {
|
): Promise<Memory[]> {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
while (Date.now() - start < maxWaitMs) {
|
while (Date.now() - start < maxWaitMs) {
|
||||||
@@ -64,7 +64,7 @@ export async function waitForMemories(
|
|||||||
if (Array.isArray(memories) && memories.length >= minCount) {
|
if (Array.isArray(memories) && memories.length >= minCount) {
|
||||||
return memories;
|
return memories;
|
||||||
}
|
}
|
||||||
await new Promise((r) => setTimeout(r, 2_000));
|
await new Promise((r) => setTimeout(r, 3_000));
|
||||||
}
|
}
|
||||||
return await client.getAll({ user_id: userId });
|
return await client.getAll({ user_id: userId });
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ export async function waitForSearchResults(
|
|||||||
client: MemoryClient,
|
client: MemoryClient,
|
||||||
query: string,
|
query: string,
|
||||||
options: Record<string, any>,
|
options: Record<string, any>,
|
||||||
maxWaitMs = 30_000,
|
maxWaitMs = 60_000,
|
||||||
): Promise<Memory[]> {
|
): Promise<Memory[]> {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
while (Date.now() - start < maxWaitMs) {
|
while (Date.now() - start < maxWaitMs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user