Skip to content

Conversation

@devcrocod
Copy link
Contributor

simplification

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@devcrocod devcrocod requested review from Copilot and kpavlov October 23, 2025 16:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the testClientConnectWithInvalidJson test to simplify error handling by replacing a verbose runCatching pattern with a more direct try-finally block using assertFailsWith.

Key Changes:

  • Replaced runCatching().onSuccess().onFailure() chain with try-finally block
  • Used assertFailsWith<IllegalStateException> for cleaner assertion of expected exception
  • Removed unused imports (TimeoutCancellationException, fail)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

… with `assertFailsWith` and remove unused imports
@devcrocod devcrocod force-pushed the devcrocod/refactor-testCleitnConnectWithInvalidJson branch from b3d6b2d to 595c07a Compare October 23, 2025 16:54
@kpavlov kpavlov merged commit 2163b23 into main Oct 23, 2025
4 checks passed
@kpavlov kpavlov deleted the devcrocod/refactor-testCleitnConnectWithInvalidJson branch October 23, 2025 18:06
@kpavlov kpavlov added the tests label Oct 23, 2025
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.

2 participants