Skip to content

Commit

Permalink
Use CancelAsync when available
Browse files Browse the repository at this point in the history
  • Loading branch information
menees committed Oct 12, 2024
1 parent 59e670e commit e925f62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Menees.Remoting.Tests/MessageNodeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ public async Task CancellationAsync()
ex.ShouldBeOfType<OperationCanceledException>();
}

#if NETCOREAPP
await serverCancellationSource.CancelAsync().ConfigureAwait(false);

Check failure on line 144 in tests/Menees.Remoting.Tests/MessageNodeTests.cs

View workflow job for this annotation

GitHub Actions / build

'CancellationTokenSource' does not contain a definition for 'CancelAsync' and no accessible extension method 'CancelAsync' accepting a first argument of type 'CancellationTokenSource' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 144 in tests/Menees.Remoting.Tests/MessageNodeTests.cs

View workflow job for this annotation

GitHub Actions / build

'CancellationTokenSource' does not contain a definition for 'CancelAsync' and no accessible extension method 'CancelAsync' accepting a first argument of type 'CancellationTokenSource' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 144 in tests/Menees.Remoting.Tests/MessageNodeTests.cs

View workflow job for this annotation

GitHub Actions / build

'CancellationTokenSource' does not contain a definition for 'CancelAsync' and no accessible extension method 'CancelAsync' accepting a first argument of type 'CancellationTokenSource' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 144 in tests/Menees.Remoting.Tests/MessageNodeTests.cs

View workflow job for this annotation

GitHub Actions / build

'CancellationTokenSource' does not contain a definition for 'CancelAsync' and no accessible extension method 'CancelAsync' accepting a first argument of type 'CancellationTokenSource' could be found (are you missing a using directive or an assembly reference?)
#else
serverCancellationSource.Cancel();
#endif
}

[TestMethod]
Expand Down

0 comments on commit e925f62

Please sign in to comment.