mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 01:27:35 +00:00
test: reduce coordinator mail polling overhead (#28945)
This commit is contained in:
@@ -294,7 +294,7 @@ afterEach(async () => {
|
||||
})
|
||||
|
||||
// Pointers are sent on asynchronous edges; the default 1s wait is too tight under a loaded parallel run.
|
||||
export const WAIT = { timeout: 10_000 }
|
||||
export const WAIT = { timeout: 10_000, interval: 10 }
|
||||
|
||||
export const POINTER =
|
||||
/You have 1 orchestration message\. Run `orca(-dev)? orchestration check --run run_\w+`\./
|
||||
|
||||
@@ -259,6 +259,7 @@ describe('a worker result reaches the structured chat that coordinates it', () =
|
||||
// provider still dies, so exactly one start proves it is pointed once, not in a loop.
|
||||
restartRuntime()
|
||||
const before = providerFaults.starts
|
||||
await observationClock.observe(2_000)
|
||||
await vi.waitFor(() => expect(providerFaults.turnStarts).toBe(2), WAIT)
|
||||
await observationClock.observe(1_500)
|
||||
await edgesAnswered()
|
||||
@@ -524,6 +525,7 @@ describe('a /clear keeps the chat its orchestration address', () => {
|
||||
})
|
||||
|
||||
it('points mail the earlier context never took at the fresh context, without a user message', async () => {
|
||||
observationClock.start()
|
||||
const chat = await openChat(COORDINATOR)
|
||||
const { runId, taskId } = await coordinatorRunAndTask()
|
||||
await finishWorker(taskId)
|
||||
@@ -537,6 +539,7 @@ describe('a /clear keeps the chat its orchestration address', () => {
|
||||
|
||||
const cleared = await clearChat(COORDINATOR)
|
||||
expect(cleared).toBe(COORDINATOR)
|
||||
await observationClock.observe(2_000)
|
||||
await vi.waitFor(() => expect(connectionFor(cleared).turns[0]?.text).toMatch(POINTER), WAIT)
|
||||
await settleTurn(cleared, 0)
|
||||
await vi.waitFor(
|
||||
|
||||
Reference in New Issue
Block a user