test: expand gRPC integration test depth for PR #3202#4658
Merged
Conversation
Add 7 tests covering previously uncovered code paths in gRPC service: - test_delete_service_chunked_bulk_delete: Verify chunked deletion of >500 tools - test_invoke_method_metadata_forwarded_to_endpoint: Confirm metadata forwarding - test_invoke_method_runtime_error_wrapped_as_grpc_service_error: Exception wrapping - test_invoke_method_finally_close_called_on_exception: Finally block execution - test_sync_tools_schema_change_increments_tools_updated: Schema change detection - test_sync_tools_unchanged_does_not_increment_tools_updated: No-change path - test_invoke_tool_grpc_dispatch_success: gRPC dispatch in tool_service All tests pass individually. No production code changes. Closes #4618 Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
Removed trailing whitespace on line 2709 that was causing pre-commit hook to fail. Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
| """Test that changing input_schema increments tools_updated counter.""" | ||
| # First-Party | ||
| from mcpgateway.db import Tool as DbTool | ||
| from mcpgateway.services.grpc_service import GrpcService |
Collaborator
There was a problem hiding this comment.
Move all the imports to top of file.
Closes #4658 Signed-off-by: Suresh Kumar Moharajan <suresh.kumar.m@ibm.com>
ja8zyjits
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 7 integration tests covering previously uncovered code paths in gRPC service management, as identified in issue #4618 (follow-up to PR #3202).
Changes
Tests Added to tests/unit/mcpgateway/services/test_grpc_service.py:
Test Added to tests/unit/mcpgateway/services/test_tool_service.py:
Testing
All 7 tests pass. No production code changes (tests only).
Closes #4618