test(maestro): fix resumes and size lifecycle waits to case tests - #726
test(maestro): fix resumes and size lifecycle waits to case tests#726Sarath1018 wants to merge 6 commits into
Conversation
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 <noreply@anthropic.com>
- pause/resume: a resume issued while the pause is still settling (Pausing) is accepted but can be lost — the pause completes afterwards and wins, leaving the instance Paused (observed live). Re-issue the resume when the status settles on Paused without running again; idempotent and race-free from Paused. - cancel: the wait-for-Running poll alone spans up to 60s, equal to the old test timeout — CI timed it out at exactly 60s. Ceiling raised to 120s. - reopen: the timer fixture completes in ~45s idle but CI-load stalls exceed 120s; the completion wait now uses the same 180s ceiling as the retry test's equivalent fault wait. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
The seeded Running.Case instance can die on its own between tests (observed live: a transient platform fault moved it Running->Faulted, making the next pause fail with "Faulted->Pausing is not a valid state transition"). resolveRunningInstance now re-checks the fixture's status on every use and seeds a replacement when it is no longer Running; sendMessage and close get 120s ceilings to cover the potential re-seed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
Extends the reuse-before-seed pattern (already used for the faulted retry fixture) to the remaining two fixtures, since terminal instances cannot be deleted via API and creation is the only growth lever: - Running.Case: scavenge an existing Running instance before starting one — interrupted runs leave them Running indefinitely (the human task never completes), so they otherwise stack as open cases in the tenant. - Timer case: reuse a Completed instance from an interrupted run before starting one; an existing Completed instance also gives the reopen test a zero-second wait. Steady-state creation drops to one instance per consuming test (close, reopen, retry) — tests that terminate their subject by definition — and interrupted-run leftovers become the next run's fixtures instead of debris. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
…he entity-methods block The Entity-level methods block re-fetched the entity via getById inside every test, so each write test's 30s budget covered two round-trips — doubling its exposure to alpha's gateway stalls — and its write tests were left at the default 30s when the suite's other DF write paths were sized to 90s. Fetch the entity once in beforeAll (still exercising the getById→bound-methods path) and give the four write tests 90s budgets; reads keep the default. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
Consolidated into #729. All six commits from this branch were cherry-picked there unchanged (verified file-by-file identical), alongside the join/valueList fix that this branch needed in order to pass — its join tests failed deterministically without it once the shared fixture grew past one page. Closing in favour of the single PR; branch kept in case anything needs to be recovered. |



Re-lands the pause/resume fix from #693 (closed unmerged) and hardens the maestro suites against fixture death and tenant instance growth.
expected 'Paused' to be 'Running'flake): a resume issued while the pause is still settling is accepted but can be lost — the test now re-issues the resume when the status settles onPaused.resolveRunningInstancere-verifies its status on every use and seeds a replacement when it is no longer Running.Verified green in both init modes.
🤖 Generated with Claude Code