Skip to content

Commit e5f152d

Browse files
committed
Remove bogus assert
1 parent b19ab58 commit e5f152d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

tests/ModelContextProtocol.Tests/Protocol/NotificationHandlerTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public async Task DisposeAsyncCompletesImmediatelyWhenInvokedFromHandler(int num
225225
var releaseHandler = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
226226

227227
IAsyncDisposable? registration = null;
228-
registration = client.RegisterNotificationHandler(NotificationName, async (notification, cancellationToken) =>
228+
await using var _ = registration = client.RegisterNotificationHandler(NotificationName, async (notification, cancellationToken) =>
229229
{
230230
for (int i = 0; i < numberOfDisposals; i++)
231231
{
@@ -240,9 +240,5 @@ public async Task DisposeAsyncCompletesImmediatelyWhenInvokedFromHandler(int num
240240

241241
await _server.SendNotificationAsync(NotificationName, TestContext.Current.CancellationToken);
242242
await handlerRunning.Task;
243-
244-
ValueTask disposal = registration.DisposeAsync();
245-
Assert.True(disposal.IsCompletedSuccessfully);
246-
await disposal;
247243
}
248244
}

0 commit comments

Comments
 (0)