From b96cbac72fbb946d2a1176d6712e25d551dae796 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:15:54 +0000 Subject: [PATCH 1/2] Bump SonarAnalyzer.CSharp from 10.5.0.109200 to 10.17.0.131074 --- updated-dependencies: - dependency-name: SonarAnalyzer.CSharp dependency-version: 10.17.0.131074 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index a4f3d7d..eb40604 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -44,7 +44,7 @@ - + From 625929f6cfda7df41535e1660e0e301fbc9a8bf4 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Sun, 21 Dec 2025 15:28:30 -0600 Subject: [PATCH 2/2] Fix test to expect OperationCanceledException CancellationToken.ThrowIfCancellationRequested() throws OperationCanceledException, not TaskCanceledException. TaskCanceledException is only thrown by the task scheduler. --- tests/MCPsharp.Tests/Services/SearchServiceTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/MCPsharp.Tests/Services/SearchServiceTests.cs b/tests/MCPsharp.Tests/Services/SearchServiceTests.cs index 25d3c25..547f3a0 100644 --- a/tests/MCPsharp.Tests/Services/SearchServiceTests.cs +++ b/tests/MCPsharp.Tests/Services/SearchServiceTests.cs @@ -398,8 +398,8 @@ public async Task SearchTextAsync_CancellationToken_CancelsOperation() Pattern = "line" }; - // Act & Assert - Assert.ThrowsAsync( + // Act & Assert - use CatchAsync to accept both OperationCanceledException and TaskCanceledException + Assert.CatchAsync( async () => await _searchService.SearchTextAsync(request, cts.Token)); }