Repository navigation
test: raise timeouts on Windows-slow remove and memory wizard tests - #2965
Conversation
On the Windows runner the two credential remove tests can pass bun's 5s default, and the memory wizard's save can take over the 1s waitForText default. A timed-out remove test keeps running after bun moves on, so its leftover remove lands in the next test's project and fails that one too.
Package TarballHow to installgh release download pr-2965-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-1.3.0.tgz |
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Test-timeout-only change; it checks out against base v1.x.
waitForText(lastFrame, text, timeoutMs = 1000)insrc/testing/renderScreen.tsx:196does take an explicit timeout (delegating towaitFor, which throwsWaitForTimeoutError), so the new third argument is correct and the described 1s default is accurate.- 15s per-test timeouts and explicit 5s
waitForTextwaits are already the convention in this suite (create.screen.test.tsx:124,config-bundle.screen.test.tsx, and four other tests inmemory.screen.test.tsx), so nothing new is being introduced here. - The added comment gives a reason (Windows write latency) rather than paraphrasing the call, and no production code, fixture, snapshot, or
command.mdis touched.
One non-blocking note for a follow-up, not a merge blocker:
The fix is scoped to exactly the waits that were observed failing, but the same wait exists on the same spec-write path in sibling tests that were left at the 1s default — memory.screen.test.tsx:122 (added memory 'events_only' to 'TestProject') and :150 (added memory 'ordered_memory' to 'TestProject') — and in remove/index.test.ts:218 (removing a secret-reference credential leaves .env.local alone), which does the same initProject + add credentials sequence as the two tests being bumped. Given the described failure mode (a timed-out test keeps running and poisons the next test), these are the next candidates to flake on the Windows runner. Bumping them too, or raising the timeoutMs default in waitForText/waitForFlatText, would cover the class rather than the two instances CI happened to surface.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1.x #2965 +/- ##
=======================================
Coverage 96.68% 96.68%
=======================================
Files 735 735
Lines 61626 61626
=======================================
+ Hits 59583 59584 +1
+ Misses 2043 2042 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Raises three test timeouts that the Windows runner exceeds:
project remove > removing a credential deletes its .env.local entry and reports itand--json reports a removal and its cleaned environment keys: 15s test timeout (default 5s).project add memory wizard > collects a name, strategies and retention, then writes the memory: 5s wait for the "added memory" frame (default 1s). The test already had a 15s test timeout.The second remove test fails only because of the first. bun does not cancel a timed-out test, so its pending
remove credential --name svc-keykeeps running after the next test haschdired into its own project, throwsno credential named 'svc-key', and bun reports it as an unhandled error against the next test.Seen on the Windows
verifyjob: https://github.com/aws/agentcore-cli/actions/runs/46477723719/job/142056312064Related Issue
None filed.
Documentation PR
Not applicable.
Type of Change
Testing
How have you tested the change?
bun test(the two changed files, on Linux)bun run test:e2e, or explained why they are not applicable(CI does not run them for you): not applicable, unit tests only
bun run typecheckbun run lint:checkbun run format:checkbun run auditbun run secrets:checkbun run buildsrc/assets/, I updated affected snapshots withbun test <test-file> --update-snapshotsand committed themby this PR
command.md(the release workflow regenerates it)Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.