From b462b43e41107728163af50c40daf03d3b59e787 Mon Sep 17 00:00:00 2001 From: Sarath1018 Date: Wed, 26 Aug 2026 12:45:14 +0530 Subject: [PATCH] test(maestro): size the resume wait for the observed propagation tail The pause/resume test asserts resume was accepted, then waits for the instance to report Running again. That Paused->Running propagation typically lands in ~5s but has been observed to exceed the previous 20s window under tenant load, failing the test on a transition that was already in flight. Widen the wait to 60s (poll exits as soon as Running is reached, so healthy runs are unaffected). Co-Authored-By: Claude Fable 5 --- .../shared/maestro/case-instances.integration.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration/shared/maestro/case-instances.integration.test.ts b/tests/integration/shared/maestro/case-instances.integration.test.ts index ee36858875..959d2574b9 100644 --- a/tests/integration/shared/maestro/case-instances.integration.test.ts +++ b/tests/integration/shared/maestro/case-instances.integration.test.ts @@ -333,9 +333,12 @@ describe.each(modes)('Maestro Case Instances - Integration Tests [%s]', (mode) = const resumeResult = await caseInstances.resume(target.instanceId, target.folderKey); expect(resumeResult.success).toBe(true); - // The instance must return to Running so later tests can keep using it + // The instance must return to Running so later tests can keep using it. The + // Paused→Running propagation is accepted immediately (success asserted above) but + // has been observed to take well over 20s under tenant load, so the wait window + // is sized for that tail rather than the ~5s typical case. let resumedStatus = ''; - for (let attempt = 0; attempt < 10; attempt++) { + for (let attempt = 0; attempt < 30; attempt++) { const current = await caseInstances.getById(target.instanceId, target.folderKey); resumedStatus = current.latestRunStatus; if (resumedStatus === InstanceStatus.RUNNING) { @@ -344,7 +347,7 @@ describe.each(modes)('Maestro Case Instances - Integration Tests [%s]', (mode) = await new Promise((resolve) => setTimeout(resolve, 2000)); } expect(resumedStatus).toBe(InstanceStatus.RUNNING); - }, 60_000); + }, 120_000); }); // Runs after pause/resume (see note there): the ad-hoc trigger spawns an in-flight task