mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
fix(tests): 修正异步扩展测试中的异常类型断言
- 将 OperationCanceledException 替换为 TaskCanceledException 进行正确的异常断言
This commit is contained in:
parent
cddd1fa627
commit
ee3f8c97df
@ -42,9 +42,8 @@ public class AsyncExtensionsTests
|
||||
// Arrange
|
||||
using var cts = new CancellationTokenSource();
|
||||
cts.Cancel();
|
||||
|
||||
// Act & Assert
|
||||
Assert.ThrowsAsync<OperationCanceledException>(async () =>
|
||||
Assert.ThrowsAsync<TaskCanceledException>(async () =>
|
||||
await AsyncExtensions.WithTimeout(
|
||||
async ct =>
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user