Skip to content

Commit 4e1c9bd

Browse files
authored
Test exception type expected for .NET Standard 2.0 (#389)
* different exception type expected for 2.0 * remove net452 as tests cannot run for Framework * Eliminate build target in test. Use common type.
1 parent 3e94068 commit 4e1c9bd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/KubernetesClient.Tests/WatchTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,13 +772,11 @@ public async Task WatchShouldCancelAfterRequested()
772772
var cts = new CancellationTokenSource();
773773
cts.CancelAfter(TimeSpan.FromSeconds(2));
774774

775-
await Assert.ThrowsAnyAsync<TaskCanceledException>(async () =>
775+
await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
776776
{
777777
await client.ListNamespacedPodWithHttpMessagesAsync("default", watch: true, cancellationToken: cts.Token);
778778
});
779-
780779
}
781-
782780
}
783781
}
784782
}

0 commit comments

Comments
 (0)