Skip to content

test(integration): restore delete_mcp teardown, tighten mcp assertions and guard coverage shutdown - #42748

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
litellm_mcp_integration_followups
Open

devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
litellm_mcp_integration_followups

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

How it solves it:

User Flow

Test-only change to tests/integration and .circleci/scripts, no user-facing behavior changes

Relevant issues

Follow-up to #42711

Affected release

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

The change is to tests and the CI runner script, so the proof is the mcp group run against a local rig (Postgres, Redis, upstream on 8190, proxy on 4000, peer on 4001) with INTEGRATION_WORKERS=4, the same shape as the CircleCI integration-mcp job minus the egress guard and coverage

After (ba07390)

  1. .venv/bin/python tests/integration/run.py mcp --results test-results/local-mcp
  2. 223 passed, 6 skipped, 0 failed in 134s; the 6 skips are the pre-existing BUG: skips listed in execution.json
  3. The ungranted-key status was observed as 200 on chat, responses and messages before pinning it

Type

✅ Test
🚄 Infrastructure

Caveats (if any)

Low

  • The resilience assertion is trivially true on server_mcp, whose listing is scoped to the healthy alias, and load-bearing on the other four entry points

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Link to Devin session: https://app.devin.ai/sessions/dbced03dbe4143269b1c81a7f4d27917
Open in Devin Desktop: https://app.devin.ai/desktop/session/dbced03dbe4143269b1c81a7f4d27917?variant=devin

yuneng-berri and others added 2 commits September 23, 2026 14:58
…s and drop docstrings

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team September 23, 2026 14:59
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with strengthened test assertions and teardown behavior and no actionable regressions identified

Summary

This PR strengthens MCP integration coverage and makes coverage-process shutdown tolerant of already-exited services

  • Restores database-row verification during normal MCP teardown while preserving idempotent cleanup for tests that delete servers themselves
  • Tightens resilience and ungranted-key assertions that previously allowed incorrect behavior
  • Prevents a benign coverage shutdown signal race from failing an otherwise successful integration job
  • Removes support-module docstrings to comply with repository conventions

Reviews (1) · Last reviewed commit: "test(integration): pin the ungranted-key..."

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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