Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,12 @@
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) {
Expand All @@ -343,8 +346,8 @@
}
await new Promise((resolve) => setTimeout(resolve, 2000));
}
expect(resumedStatus).toBe(InstanceStatus.RUNNING);

Check failure on line 349 in tests/integration/shared/maestro/case-instances.integration.test.ts

View workflow job for this annotation

GitHub Actions / coverage / coverage

tests/integration/shared/maestro/case-instances.integration.test.ts > Maestro Case Instances - Integration Tests [v1] > pause and resume > should pause a running case instance and resume it

AssertionError: expected 'Paused' to be 'Running' // Object.is equality Expected: "Running" Received: "Paused" ❯ tests/integration/shared/maestro/case-instances.integration.test.ts:349:29
}, 60_000);
}, 120_000);
});

// Runs after pause/resume (see note there): the ad-hoc trigger spawns an in-flight task
Expand Down
Loading