fix(test): bump agent-interface token refresh timeout to 30s#777
Merged
Conversation
…o 30s The "refreshes the MCP Authorization header when the token rotates between attempts" test simulates a 60s cold-start stall plus jittered backoff (2-30s) inside fake timers — up to ~90s of virtual time per attempt. The test logic is correct, but the per-test 15s real-time timeout left no headroom for the scheduler under CI load on Node 20, producing intermittent "Test timed out in 15000ms" failures across multiple PRs (#765, #766, #767, #768, #769, #771). Double the timeout to 30s. No logic change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The "refreshes the MCP Authorization header when the token rotates
between attempts" test in
src/lib/__tests__/agent-interface.test.tssimulates a 60s cold-start stall plus jittered backoff (2-30s)
inside fake timers — up to ~90s of virtual time per attempt. The
test logic is correct, but the per-test 15s real-time timeout left
no headroom for the scheduler under CI load on Node 20, producing
intermittent "Test timed out in 15000ms" failures across multiple
recent PRs (#765, #766, #767, #768, #769, #771).
Fix
Double the timeout from 15s to 30s. No logic change.
Test plan
agent-interface.test.tssuite (298 tests) passes locally🤖 Generated with Claude Code
Note
Low Risk
Low risk: test-only change that increases the timeout to reduce CI flakiness, with no production logic impact.
Overview
Extends the Vitest timeout for the
runAgenttoken-rotation test insrc/lib/__tests__/agent-interface.test.tsfrom 15s to 30s to prevent intermittent CI timeouts under slow runners, without changing test behavior or production code.Reviewed by Cursor Bugbot for commit f2794b0. Bugbot is set up for automated code reviews on this repo. Configure here.