Skip to content

tests: clean up integration fixtures with DeleteIntegration#622

Merged
winhowes merged 1 commit intomainfrom
codex/fix-base-transport-mutation-in-tests
Apr 13, 2026
Merged

tests: clean up integration fixtures with DeleteIntegration#622
winhowes merged 1 commit intomainfrom
codex/fix-base-transport-mutation-in-tests

Conversation

@winhowes
Copy link
Copy Markdown
Owner

Motivation

  • Several integration tests were leaking state into the global integration registry by only stopping limiter goroutines, causing intermittent failures like "integration ... already exists" when tests ran repeatedly or in different orders.
  • Use the public cleanup function to ensure both the registry entry and associated limiters are removed to avoid cross-test interference.

Description

  • Replace direct calls to i.inLimiter.Stop() / i.outLimiter.Stop() with DeleteIntegration(i.Name) in tests.
  • Applied the change in TestIntegrationRateLimitWindow, TestIntegrationTransportSettings, and TestIntegrationPluginTransport in app/integration_test.go.
  • This centralizes cleanup so the integration entry is removed from the global map and its limiters are stopped consistently.

Testing

  • Ran go test ./app -run 'TestIntegrationRateLimitWindow|TestIntegrationPluginTransport' -count=1 and both tests passed.
  • Ran go test ./app -count=1 and the package tests passed.
  • Ran go test ./... -count=1 and the full test suite passed.

Codex Task

@winhowes
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@winhowes winhowes merged commit a678201 into main Apr 13, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant