Skip to content

[codex] fix auth callback test timeout#23

Merged
JeelyWu merged 1 commit into
masterfrom
fix/auth-callback-test-timeout
May 16, 2026
Merged

[codex] fix auth callback test timeout#23
JeelyWu merged 1 commit into
masterfrom
fix/auth-callback-test-timeout

Conversation

@JeelyWu
Copy link
Copy Markdown
Owner

@JeelyWu JeelyWu commented May 16, 2026

Summary

  • Make TestServiceLoginAcceptsAutomaticLocalCallback wait for the injected callback listener before sending the browser callback request.
  • Add short test/client timeouts so callback failures fail quickly instead of hanging until the package timeout.

Root Cause

The test used browser.urls as the readiness signal, but Service.Login opens the browser URL before starting the local callback listener. In CI, the test goroutine could send the callback request before the listener was serving, then Login kept waiting on the manual input pipe until the global 10 minute test timeout fired.

Validation

  • go test ./internal/auth -run TestServiceLoginAcceptsAutomaticLocalCallback -count=100 -timeout=30s
  • go test ./...
  • go test -race ./internal/auth -run TestServiceLoginAcceptsAutomaticLocalCallback -count=1 -timeout=30s

@JeelyWu JeelyWu marked this pull request as ready for review May 16, 2026 14:01
@JeelyWu JeelyWu merged commit 16c883a into master May 16, 2026
1 check 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