Skip to content

Commit b4cc449

Browse files
Merge pull request #99 from 73ai/fix-gemini-test-timeout
fix(tools): use production timeout for agent integration tests
2 parents bf4f144 + 827b1dd commit b4cc449

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

agent/tools/agent_runner_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestAgentRunner_RealClaude(t *testing.T) {
200200
}
201201
}
202202
r := NewAgentRunner(info)
203-
out, err := r.Run(context.Background(), "Say hello in exactly one word.", 30*time.Second)
203+
out, err := r.Run(context.Background(), "Say hello in exactly one word.", defaultDelegateTimeout)
204204
if err != nil {
205205
t.Fatalf("Run: %v", err)
206206
}
@@ -222,7 +222,7 @@ func TestAgentRunner_RealGemini(t *testing.T) {
222222
}
223223
}
224224
r := NewAgentRunner(info)
225-
out, err := r.Run(context.Background(), "Say hello in exactly one word.", 30*time.Second)
225+
out, err := r.Run(context.Background(), "Say hello in exactly one word.", defaultDelegateTimeout)
226226
if err != nil {
227227
if strings.Contains(err.Error(), "Permission") || strings.Contains(err.Error(), "denied") || strings.Contains(err.Error(), "auth") {
228228
t.Skipf("gemini auth not configured: %v", err)
@@ -247,7 +247,7 @@ func TestAgentRunner_RealCodex(t *testing.T) {
247247
}
248248
}
249249
r := NewAgentRunner(info)
250-
out, err := r.Run(context.Background(), "Say hello in exactly one word.", 30*time.Second)
250+
out, err := r.Run(context.Background(), "Say hello in exactly one word.", defaultDelegateTimeout)
251251
if err != nil {
252252
if strings.Contains(err.Error(), "auth") || strings.Contains(err.Error(), "API key") || strings.Contains(err.Error(), "login") {
253253
t.Skipf("codex auth not configured: %v", err)

agent/tools/agent_stream_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"os/exec"
66
"strings"
77
"testing"
8-
"time"
98
)
109

1110
func TestParseStreamLine_Text(t *testing.T) {
@@ -218,7 +217,7 @@ func TestStreamRunner_RealClaude(t *testing.T) {
218217
}
219218
r := NewStreamRunner(info)
220219
var eventCount int
221-
out, err := r.RunStream(context.Background(), "Say hello in exactly one word.", 30*time.Second, func(evt StreamEvent) {
220+
out, err := r.RunStream(context.Background(), "Say hello in exactly one word.", defaultDelegateTimeout, func(evt StreamEvent) {
222221
eventCount++
223222
})
224223
if err != nil {
@@ -246,7 +245,7 @@ func TestStreamRunner_RealGemini(t *testing.T) {
246245
}
247246
r := NewStreamRunner(info)
248247
var eventCount int
249-
out, err := r.RunStream(context.Background(), "Say hello in exactly one word.", 30*time.Second, func(evt StreamEvent) {
248+
out, err := r.RunStream(context.Background(), "Say hello in exactly one word.", defaultDelegateTimeout, func(evt StreamEvent) {
250249
eventCount++
251250
})
252251
if err != nil {
@@ -274,7 +273,7 @@ func TestStreamRunner_RealCodex(t *testing.T) {
274273
}
275274
r := NewStreamRunner(info)
276275
var eventCount int
277-
out, err := r.RunStream(context.Background(), "Say hello in exactly one word.", 30*time.Second, func(evt StreamEvent) {
276+
out, err := r.RunStream(context.Background(), "Say hello in exactly one word.", defaultDelegateTimeout, func(evt StreamEvent) {
278277
eventCount++
279278
})
280279
if err != nil {

0 commit comments

Comments
 (0)