Skip to content

fix(tools): use production timeout for agent integration tests#99

Merged
priyanshujain merged 1 commit intomasterfrom
fix-gemini-test-timeout
Mar 18, 2026
Merged

fix(tools): use production timeout for agent integration tests#99
priyanshujain merged 1 commit intomasterfrom
fix-gemini-test-timeout

Conversation

@priyanshujain
Copy link
Copy Markdown
Collaborator

Summary

  • Agent runner and stream integration tests (TestAgentRunner_RealGemini, TestStreamRunner_RealGemini, etc.) used a hardcoded 30s timeout
  • Production code uses defaultDelegateTimeout (5 minutes) — these are background delegation tasks, not latency-sensitive operations
  • Gemini CLI cold-starts take ~31s, causing flaky test failures when the 30s timeout hits during initialization
  • When running with the full test suite, CPU contention makes this worse

Changed all 6 real agent tests to use defaultDelegateTimeout instead of 30*time.Second. The Go test framework's own timeout (-timeout flag, default 10min) is the real safety net against hangs.

Test plan

  • TestAgentRunner_RealGemini passes (12s)
  • TestStreamRunner_RealGemini passes (10s)
  • go build ./agent/tools/... clean

Agent runner/stream tests used a 30s timeout while production uses
5 minutes (defaultDelegateTimeout). The tight timeout caused flaky
failures when gemini CLI had a cold start (~31s) or when running
alongside the full test suite. These are correctness tests, not
performance tests — match the production timeout.
@priyanshujain priyanshujain merged commit b4cc449 into master Mar 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant